AWS Cloud formation script

+4 votes

I ve used the following AWS CLI Cloud Formation commands for create and then execute and change set:

aws cloudformation create-change-set --change-set-name change-set-1

aws cloudformation execute-change-set --change-set-name change-set-1

The problem is the first command returns before the change set is created, also if try I execute the second command immediately it fails.

I could come to terms with following possible solutions

  1. Adding a delay between the two commands.
  2. Repeating the second command until it succeeds.

Both have their problems.

Ideally there would be an option on the create-change-set command to execute immediately, or to run synchronously and not return until the change set has been created.

Is there a way to get a better solution?

Mar 27, 2018 in Cloud Computing by brat_1
• 7,200 points
1,323 views

2 answers to this question.

+1 vote
You may use the update-stack sub command. But this is possible you don't require the intermediate step creation of a change set and then execute it

aws cloudformation update-stack --stack-name myStack --template-url ...
answered Mar 27, 2018 by code_ninja
• 6,300 points
0 votes

An Origin Access Identity cannot be created with CloudFormation. The only CloudFront resource available through Cloudformation is the AWS::CloudFront::Distribution resource.

You can avoid hard coding a reference to an OAI in your template by using a parameter to pass in an existing OAI when your stack is created. You can then use this parameter as the value for OriginAccessIdentity in the S3Origin type associated with the S3OriginConfig key.

This isn't ideal, but it allows you to make your templates more generic.

answered Oct 11, 2018 by findingbugs
• 4,780 points

Related Questions In Cloud Computing

0 votes
1 answer

AWS EC2 Cloud: Can you remove Bitnami info page banner for AWS Cloud EC2

Now the problem is to remove the ...READ MORE

answered May 23, 2018 in Cloud Computing by Meci Matt
• 9,460 points
1,039 views
0 votes
1 answer

AWS EC2: Virtual Cloud Member

No, it is not possible for an ...READ MORE

answered Jun 7, 2018 in Cloud Computing by brat_1
• 7,200 points
657 views
0 votes
1 answer

How do secure data on cloud or cloud platforms like AWS?

The most efficient way of securing data ...READ MORE

answered Jul 17, 2018 in Cloud Computing by DragonLord999
• 8,450 points
688 views
0 votes
1 answer

What is Cloud Formation?

Cloud Formation is a service which is ...READ MORE

answered Jul 17, 2018 in Cloud Computing by sunshine
• 1,300 points
825 views
0 votes
1 answer

Can Someone tell me why do we need AWS cloud watch?

Amazon CloudWatch is a monitoring and management ...READ MORE

answered Aug 2, 2018 in Cloud Computing by Meci Matt
• 9,460 points
529 views
0 votes
1 answer

What is AWS Cloud HSM?

AWS CloudHSM is a cloud-based hardware security ...READ MORE

answered Oct 23, 2018 in Cloud Computing by DragonLord999
• 8,450 points
1,178 views
0 votes
1 answer

What is an example of agility in the aws cloud?

In AWS, agility means quickly adjusting how ...READ MORE

answered Nov 20, 2023 in Cloud Computing by Diya
586 views
0 votes
1 answer

AWS : Elastic Cloud Compute

Choose Option A. The best way of ...READ MORE

answered Jun 27, 2018 in Cloud Computing by code_ninja
• 6,300 points
694 views
+4 votes
3 answers

AWS API Gateway with AWS WAF

Well that is not possible, Reason: API Gateway would ...READ MORE

answered Mar 27, 2018 in Cloud Computing by code_ninja
• 6,300 points
1,912 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP