CloudFormation Flashcards

1
Q

AWS CFT

A

describes all resources and their properties in JSON or YAML. It is recommended to write a template for each layer of architecture to minimize down-time.

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

Stack

A

is created on a successful execution of a template in CloudFormation, executing a template creates a defined set of AWS resources. a group of these AWS resources defined in CF is called a stack.

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

deletion policy

A

3 attributes: delete; retain; Snapshot.

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

Template structure

A

– AWSTemplateFormatVersion: optional, default is latest available format.
– Description: optional up to 1024 bytes. should be always next to the AWSTemplateForamtVersion.
– Metadata: optional. Init – defines the configuration or settings for the cfn-init helper scripts in the EC2 instance; Interface – helps to define the grouping and ordering for the input parameters. Designer – automatically added o the CFT when it is created using AWS CF Designer.
– Parameters: used to pass values into the template. maximum of 60 in a CFT.
– Mappings – values from parameters, pseudo parameters or intrinsic functions cannot be used.
– Conditions – can be modified only when resources are added, modified, or deleted.
transform;
– resources: where you create resources.
– Outputs:

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

best practice

A

use cross-stack reference to integrate resources from multiple templates into one template.
provide essential IAM privileges to the IAM user executing a CFT to create a stack.
reuse the whole or part of the template;
use nested stack to perform common template patterns.
not to embed credentials in any template.
use latest helper scripts.
before creating a stack, validate the template syntax.
stack resource modification should be carried out by modifying a template rather than directly performing the action.

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

Intrinsic Functions

A

Used to pass in values that are not available until run time. very practical when creating resources.
Fn::GetAttr – get attributes from a specified resources;
Fn::FindlinMap – returns value of a key from a specified mapping.
Fn::Join – Concatenates elements, separated by a specified delimiter;
Ref – Return a recource or value based on a logical name or parameter;
Fn:GetAZa – get the AZa for a specified region
Fn::Select - returns a single object from a list of objects by index.
You can only use intrinsic functions in specific parts of a template. You can use intrinsic functions in resource properties, metadata attributes, and update policy attributes.

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

CloudFormation Template specifies a public IP

A

appropriate for Bastion host. a domain controller, database server. and log collection server typically would not require a public IP address.

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

What is the default limit for CloudFormation templates per region?

A

There are no limits to the number of templates. but there is a limit of 200 stacks per AWS account. by default allows 20 stacks per region to be running at any given time.

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

Intrinsic Functions

A

You can only use intrinsic functions in specific parts of a template. You can use intrinsic functions in resource properties, metadata attributes, and update policy attributes.

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