CloudFormation Flashcards

1
Q

You are look­ing at im­ple­ment­ing au­to­mat­ic de­ployment of an ap­pli­ca­tion as part of a CI/CD process.
The ap­pli­ca­tion uses two Cloud­For­ma­tion stacks,
one which cre­ates a VPC and as­so­ci­at­ed re­sources
and the oth­er which cre­ates the ap­pli­ca­tion resources such as EC2 and RDS.

A

The VPC and Ap­pli­ca­tion re­sources have sep­a­rate
life­cy­cles. This gen­er­al­ly means defin­ing them in
two stacks. By us­ing cross stack ref­er­ences you
can de­ploy ap­pli­ca­tion stacks which ref­er­ence the
VPC stack & al­low for many ap­pli­ca­tion stacks per
VPC stack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which prod­uct or fea­tures should you use
to en­sure in­stances are con­fig­ured in a cer­tain way
when launched, don’t go into ser­vice un­til ful­ly config­ured and can be up­dat­ed us­ing CFN in the future

A

cfn-hup, cfn-init & cfn-signal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A leading commercial bank discovered an issue with their online banking system that is hosted on their Auto Scaling group and scaled out to over 60 EC2 instances. The Auto Scaling group is taking multiple nodes offline at the same time whenever you update the Launch Configuration. To update the system, the development team decided to use AWS CloudFormation by changing a parameter to the latest version of the code.

What can you do to limit the impact on customers while the update is being performed?

A

In the CloudFormation template, add the UpdatePolicy attribute and then enable the WaitOnResourceSignals property. In the user data script, append a health check to signal CloudFormation that the update has been successfully completed.

NO DependsON and Wait condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A SysOps Administrator has been instructed to handle the deployment of the cloud resources in a single AWS account using CloudFormation. The Administrator must develop a unified template that can be reused for multiple environments instead of manually copying and pasting the same configurations into the template. The dedicated template will be used and referenced from within other templates in the same AWS Region. If the template has been updated, any stack that is referencing it will automatically use the updated configuration.

How can the Administrator meet this requirement?

A

Nested stacks are stacks created as part of other stacks. You can create a nested stack within another stack by using the AWS::CloudFormation::Stack resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A SysOps Administrator needs to create a CloudFormation template that should automatically rollback in the event that the entire stack failed to launch. The application stack requires the pre-requisite packages to be installed first in order for it to run properly, which could take about an hour or so to complete.

What should the Administrator add in the template to accomplish this requirement?

A

In the ResourceSignal parameter of the CreationPolicy resource attribute, add a Timeout property with a value of 2 hours.

NOT DependsON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A company is heavily using AWS CloudFormation templates to automate the deployment of their cloud resources. The SysOps Administrator needs to write a template that will automatically copy objects from an existing S3 bucket into the new one.

Which of the following is the most suitable configuration for this scenario?

A

Set up an AWS Lambda function and configure it to perform the copy operation. Integrate the Lambda function to the Cloudformation template as a custom resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A multinational investment bank plans to adopt a hybrid cloud architecture. To migrate their on-premises applications to AWS Cloud, the SysOps Administrator should prepare a couple of CloudFormation templates that will automatically provision the required resources.

Which section is required when designing a template?

A

Resources section

NOT Parameters, as they are optional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A SysOps Administrator uses AWS CloudFormation to update the resources configuration. After updating the CloudFormation stack, they saw the status UPDATE_ROLLBACK_FAILED. To return the stack to its original state, they must fix the cause of the failure.

Which of the following options would you implement to satisfy the above requirement?

A

Manually fix the error that causes the update rollback to fail. Select stack actions and choose continue update rollback.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A financial company has recently developed a suite of web applications that should be deployed in AWS. You have been asked to create a CloudFormation template for each application that would automatically launch the required AWS resources. To make the deployments manageable, you need to configure the template so that values are based on the region in which the template is launched in.

Which of the following section in the template can help you accomplish this?

A

Mappings.

NOT Conditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly