| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Custom resource provider requests with RequestType set to "Create" are sent
when the template developer creates a stack that contains a custom resource.
Create requests contain the following fields:
Will be "Create".
A unique ID for the request.
The response URL identifies a pre-signed Amazon S3 bucket that receives responses from the custom resource provider to AWS CloudFormation.
The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template.
The Amazon Resource Name (ARN) that identifies the stack containing the custom resource.
This field contains the contents of the Properties object sent by the template developer. Its contents are defined by the custom resource provider.
{
"RequestType" : "Create",
"RequestId" : "unique id for this create request",
"ResponseURL" : "pre-signed-url-for-create-response",
"LogicalResourceId" : "name of resource in template",
"StackId" : "arn:aws:cloudformation:us-east-1:namespace:stack/stack-name/guid",
"ResourceProperties" : {
"key1" : "string",
"key2" : [ "list" ],
"key3" : { "key4" : "map" }
}
} When the create request is successful, a response must be sent to the S3 bucket with the following fields:
Must be "SUCCESS".
The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template. This response value should be copied verbatim from the request.
A unique ID for the request. This response value should be copied verbatim from the request.
The Amazon Resource Name (ARN) that identifies the stack containing the custom resource. This response value should be copied verbatim from the request.
This value should be an identifier unique to the custom resource vendor, and can be up to 1Kb in size.
Optional, custom resource provider-defined name/value pairs to send with the response. The values
provided here can be accessed by name in the template with Fn::GetAtt.
{
"Status" : "SUCCESS",
"LogicalResourceId" : "name of resource in template (copied from request)",
"RequestId" : "unique id for this create request (copied from request)",
"StackId" : "arn:aws:cloudformation:us-east-1:namespace:stack/stack-name/guid (copied from request)",
"PhysicalResourceId" : "required vendor-defined physical id that is unique for that vendor",
"Data" : {
"keyThatCanBeUsedInGetAtt1" : "data for key 1",
"keyThatCanBeUsedInGetAtt2" : "data for key 2"
}
} When the create request fails, a response must be sent to the S3 bucket with the following fields:
Must be "FAILED".
Describes the reason for a failure response.
The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template. This response value should be copied verbatim from the request.
A unique ID for the request. This response value should be copied verbatim from the request.
The Amazon Resource Name (ARN) that identifies the stack containing the custom resource. This response value should be copied verbatim from the request.
{
"Status" : "FAILED",
"Reason" : "Required failure reason string",
"LogicalResourceId" : "name of resource in template (copied from request)",
"RequestId" : "unique id for this create request (copied from request)",
"StackId" : "arn:aws:cloudformation:us-east-1:namespace:stack/stack-name/guid (copied from request)"
}