How do I resolve the "Resource timed out waiting for creation of physical resource" error when I create a resource using my resource provider type in CloudFormation?

2 minute read
0

When I use my Resource Provider type to create a resource in AWS CloudFormation, I receive the following error: "Resource timed out waiting for creation of physical resource"

Short description

When a resource doesn't return its primaryIdentifier or Physical ID within 60 seconds, you receive the "Resource timed out waiting for creation of physical resource" error. This error occurs because the CreateHandler of your resource doesn't return the property that's specified as the primaryIdentifier in the organization-service-resource.json resource provider schema file.

For other errors that are related to using a resource provider, see the following articles:

Resolution

1.    In your organization-service-resource.json file, confirm that the primaryIdentifier definition uses the following format, where Id is a property that's defined in the properties section:

"primaryIdentifier": [
    "/properties/Id"
]

Note: The organization-service-resource.json format is located in the root directory of your project.

2.    In your CreateHandler, set the primaryIdentifier property in the model object. For example:

final ResourceModel model = request.getDesiredResourceState();
model.setId("abcdxyz");
return ProgressEvent.<ResourceModel, CallbackContext>builder()
    .resourceModel(model)
    .status(OperationStatus.SUCCESS)
    .build();

Related information

AWS CloudFormation CLI (from the GitHub website)

AWS OFFICIAL
AWS OFFICIALUpdated a year ago
No comments