AWS CloudFormation Flashcards

1
Q

I have a cloud formation templates with both RDS and S3, I want to delete the template but have the data in booth S3 and RDS retained, what options do I have?

A

Set the deletion policy to retain for S3 and set the deletion policy to snapshot for RDS.

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

What is a cloud formation stack?

A

It is an entity that is used to create one or more resources inside AWS.

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

What are cloud formation events?

A

They are part of a stack and are the different events that happen during stack creation.

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

I wnat to receive notifications for a stack, how can I architect this?

A

You can configure a stack to send a notification to SNS.

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

What does a stack consist of?

A
  • Stack events
  • Resources
  • Outputs
  • Parameters
  • Templates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a logical ID?

A

This is the id given by the template to the resource, AWS will create a physical resource OD when creating a resource.

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

When you update a resource, either by parameter or template configuration, what are the three update actions that can happen to a resource?

A
  • Update with no interruption
  • Update with some interruption
  • Replacement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the changeset?

A

A changeset is used when updating n a stack, it enables you to see that is been changed form the old stack resource to the new, it also shows you how each resource is been changed.

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

When I am creating a stack, what permissions are used?

A

The stack will use the permissions of the users creating the stack. But you can create an AWS IAM service role

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

I need to be able to allow a junior to perform stack updates, I do not what to give the junior admin permissions, how can I achieve this?

A

You can use a stack role to give the stack admin, the admin service rile will be used by the stack to create updated resources, while allowing a junior just enough permissions to access the stack to kick off the update.

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

What is Stackset?

A

A Stackset enables you to create stacks in the multipal region in multiple accounts.

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

I wnat to use an automated method to enable CloudTrailor AWSConfig in multiple accounts in my organization?

A

You can create a Stackset and use it to create a stack in a separate account and region.

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

What are a Stackset admin and target account?

A

The admin account is the account where you are admin the Stackset and the target account is where th estate will be created.

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

If I have a large RTO and I wnat to implement a DR where my infrastructure is recreated in a new region, what are my options?

A

You could use cloud formation to restore in case of disaster. This could take the form of, a backup and restore, pilot light or warm standby.

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

What is a custom resource?

A

It is a block in a stack template that reaches out to an external resource (Lambda, SNS) to have something done, after which the external resource calls back.

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

What are the times when a custom resource will execute external resource?

A
  • Created
  • Updated
  • Deleted
17
Q

When using a custom resource where will you get the response URL?

A

You get it in the request JSON payload.

18
Q

What is a CustomResource

A

A CustomResource is a resource in the cloud formation that enables you to call out to an external entity to have some function performed. You can have SNS or Lambda.

19
Q

I have an RDS database and S3 a bucket created with cloud formation, I am deleting the cloud formation, what do I need to set in the CF to ensure RDS DB and S3 bucket is retained?

A
  • Set the DeletePolicy to snapshot the RDS.

- Set the DeletePolicy to retain the S3 bucket.

20
Q

What is a CF UpdatePolicy?

A

Update policy is a CF attribute for Autoscaling, Lambda: Alais that defines how an Autoscaling group should update,

21
Q

If I am using AutoScalingReplacingUpdate, what will happen?

A

Autoscaling will create a new group and if all goes good will delete the old one, if not it will roll back and use the existing one. You can decide when the max number of the instance are reached before failover happens.

22
Q

If ai am using AutoScalingRollingUpdate, explain what happens?

A

Update are preformed in the autoscaling group and updates instances that are in an Auto Scaling group in batches or all at once

23
Q

What are the update policies?

A
  • AutoScalingReplacingUpdate: This will replace the Autoscaling group, but only after it creates the new autoscaling group and verifies good instances.
  • AutoScalingRollingUpdate : Will replace the instances one by one in the existing autoscaling group.
24
Q

What is a creation policy?

A

You associate the policy with a resource to ensure it with on getting a signal cfn_signal before proceeding.

25
Q

What is a deletion policy?

A

It ensures resources are backed up before deleting, you have the following options,

S3 = retain.

Snapshot for these,

AWS::EC2::Volume

AWS::ElastiCache::CacheCluster

AWS::ElastiCache::ReplicationGroup

AWS::Neptune::DBCluster

AWS::RDS::DBCluster

AWS::RDS::DBInstance

AWS::Redshift::Cluster