Daniel
Daniel

Reputation: 2500

Combine AWS CLI and CloudFormation?

I'm creating a new user pool in AWS Cognito. As you might know, CF support is missing for a lot of the features in Cognito, so I´ve resorted to using the CLI for Cognito. But I still want to use CloudFormation for other resources like API Gateway that will need to reference the new user pool.

Is there any way I can create parameters with the CLI that I can use in CloudFormation?

Upvotes: 1

Views: 1380

Answers (1)

Jamie Starke
Jamie Starke

Reputation: 9234

Yes, if you have Parameters in your template, then you can use the CloudFormation Deploy command to do exactly this.

For example, you can call aws cloudformation deploy --template-file <file_path> --stack-name <stack_name> --parameter-overrides ParameterKey1=ParameterValue1 ParameterKey2=ParameterValue2 ... where <file_path> is the path to your CloudFormation Template, and <stack_name> is the name of your CloudFormation Stack. If this stack doesn't exist yet, Deploy will create it, but if it does exist, Deploy will update it.

Upvotes: 2

Related Questions