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,080 points
96 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,220 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,750 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,420 points
290 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,080 points
22 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,380 points
20 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,240 points
28 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,420 points
32 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,380 points
65 views
+3 votes
3 answers

Is there a way to install apache drill on an EMR cluster on AWS that is already Running?

It looks to be trying to get ...READ MORE

answered Oct 11, 2018 in Cloud Computing by findingbugs
• 4,750 points
331 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,220 points
54 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,220 points
414 views