Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 4.36 KB

cloudformation.md

File metadata and controls

59 lines (40 loc) · 4.36 KB

1. What is AWS CloudFormation?

AWS CloudFormation is a service that allows you to define and provision infrastructure as code, enabling you to create, update, and manage AWS resources in a declarative and automated way.

2. What are the benefits of using AWS CloudFormation?

Benefits of using AWS CloudFormation include infrastructure as code, automated resource provisioning, consistent deployments, version control, and support for template reuse.

3. What is an AWS CloudFormation template?

An AWS CloudFormation template is a JSON or YAML file that defines the AWS resources and their configurations needed for a particular stack.

4. How does AWS CloudFormation work?

AWS CloudFormation interprets templates and deploys the specified resources in the order defined, managing the provisioning, updating, and deletion of resources.

5. What is a CloudFormation stack?

A CloudFormation stack is a collection of AWS resources created and managed as a single unit, based on a CloudFormation template.

6. What is the difference between AWS CloudFormation and AWS Elastic Beanstalk?

AWS CloudFormation provides infrastructure as code and lets you define and manage resources at a lower level, while AWS Elastic Beanstalk is a platform-as-a-service (PaaS) that abstracts the deployment of applications.

7. What is the purpose of a CloudFormation change set?

A CloudFormation change set allows you to preview the changes that will be made to a stack before applying those changes, helping to ensure that updates won't cause unintended consequences.

8. How can you create an AWS CloudFormation stack?

You can create a CloudFormation stack using the AWS Management Console, AWS CLI, or AWS SDKs. You provide a template, choose a stack name, and specify any parameters.

9. How can you update an existing AWS CloudFormation stack?

You can update a CloudFormation stack by making changes to the template or stack parameters and then using the AWS Management Console, AWS CLI, or SDKs to initiate an update.

10. What is the CloudFormation rollback feature?

The CloudFormation rollback feature automatically reverts changes to a stack if an update fails, helping to ensure that your infrastructure remains consistent.

11. How does AWS CloudFormation handle dependencies between resources?

CloudFormation handles dependencies by automatically determining the order in which resources need to be created or updated to maintain consistent state.

12. What are CloudFormation intrinsic functions?

CloudFormation intrinsic functions are built-in functions that you can use within templates to manipulate values or perform dynamic operations during stack creation and update.

13. How can you perform conditionals in CloudFormation templates?

You can use CloudFormation's intrinsic functions, such as Fn::If and Fn::Equals, to define conditions and control the creation of resources based on those conditions.

14. What is the CloudFormation Designer?

The CloudFormation Designer is a visual tool that helps you design and visualize CloudFormation templates using a drag-and-drop interface.

15. How can you manage secrets in CloudFormation templates?

You should avoid hardcoding secrets in templates. Instead, you can use AWS Secrets Manager or AWS Parameter Store to store sensitive information and reference them in your templates.

16. How can you provision custom resources in CloudFormation?

You can use AWS Lambda-backed custom resources to perform actions in response to stack events that aren't natively supported by CloudFormation resources.

17. What is stack drift in AWS CloudFormation?

Stack drift occurs when actual resources in a stack differ from the expected resources defined in the CloudFormation template.

18. How does CloudFormation support rollback triggers?

Rollback triggers in CloudFormation allow you to specify actions that should be taken when a stack rollback is initiated, such as sending notifications or cleaning up resources.

19. Can AWS CloudFormation be used for creating non-AWS resources?

Yes, CloudFormation supports custom resources that can be used to manage non-AWS resources or to execute arbitrary code during stack creation and update.

20. What is CloudFormation StackSets?

CloudFormation StackSets allow you to deploy CloudFormation stacks across multiple accounts and regions, enabling centralized management of infrastructure deployments.