aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.66k stars 3.92k forks source link

InsufficientCapabilitiesException while provisioning AWS::ServiceCatalog::CloudFormationProvisionedProduct #1887

Closed amitsha256 closed 4 years ago

amitsha256 commented 5 years ago
 0/3 | 17:48:40 | CREATE_IN_PROGRESS   | AWS::CDK::Metadata                                    | CDKMetadata
 0/3 | 17:48:40 | CREATE_IN_PROGRESS   | AWS::ServiceCatalog::CloudFormationProvisionedProduct | StaticSiteProduct
Stack ShowcaseStaticSiteStack is still not stable (CREATE_IN_PROGRESS)
 0/3 | 17:48:43 | CREATE_IN_PROGRESS   | AWS::CDK::Metadata                                    | CDKMetadata Resource creation Initiated
 1/3 | 17:48:43 | CREATE_COMPLETE      | AWS::CDK::Metadata                                    | CDKMetadata
 1/3 | 17:48:45 | CREATE_IN_PROGRESS   | AWS::ServiceCatalog::CloudFormationProvisionedProduct | StaticSiteProduct Resource creation Initiated
Stack ShowcaseStaticSiteStack is still not stable (CREATE_IN_PROGRESS)
 2/3 | 17:48:46 | CREATE_FAILED        | AWS::ServiceCatalog::CloudFormationProvisionedProduct | StaticSiteProduct Unable to launch provisioned product because: Error calling API cloudformation:CreateStack. ErrorCode: InsufficientCapabilitiesException, Message: Requires capabilities : [CAPABILITY_AUTO_EXPAND]

This product's template uses AWS::Serverless Transform. AWS CDK version: 0.24.0.

I thought that CDK version 0.24.0 fixes the issue where CAPABILITY_AUTO_EXPAND wasn't getting added to the change set. But I'm still getting this error. Am I doing something wrong or is this still an issue? Am

amitsha256 commented 5 years ago

I tried using the aws cli and got the same error. aws cloudformation create-stack --stack-name ShowcaseStaticSiteStack --capabilities CAPABILITY_AUTO_EXPAND --template-body file://ShowcaseStaticSiteStack.template.yaml --region ap-southeast-2 I still get this error from cloudformation: Unable to launch provisioned product because: Error calling API cloudformation:CreateStack. ErrorCode: InsufficientCapabilitiesException, Message: Requires capabilities : [CAPABILITY_AUTO_EXPAND] So, this may not be an aws-cdk bug.

amitsha256 commented 5 years ago

Looks like cloudformation isn't able to pass on the capability to create the other stack?

eladb commented 5 years ago

Confirming this is an issue with the service catalog resource in CloudFormation. Will report back when resolved (ref: TT0175495026).

michaelday008 commented 5 years ago

I'm attempting to use CDK CreateUpdateStackAction.

I get the error that I need CAPABILITY_AUTO_EXPAND.

However, cloudformation.CloudFormationCapabilities only has 3 choices, None, AnonymousIAM, NamedIAM.

Auto Expand is not a valid option.

Is there some workaround or is the CreateUpdateStackAction currently broken and unable to be used at all?

eladb commented 4 years ago

This has now been fixed.

danboone commented 4 years ago

I have gotten the error: An error occurred (InsufficientCapabilitiesException) when calling the CreateStack operation: Requires capabilities : [CAPABILITY_AUTO_EXPAND] I'm trying to create a SAM application for a fork-event-storage-backup-pipeline in .net I have the latest aws-cdk installed and i would be very grateful for any help.