Forrest logo
back to the aws tool

aws-cloudformation:tldr:dbaf6

aws-cloudformation: Create a stack from a template file.
$ aws cloudformation create-stack --stack-name ${stack-name} --region ${region} --template-body ${file:--filename-yml} --profile ${profile}
try on your machine

This command is used to create a new AWS CloudFormation stack. Let's break it down:

  • aws cloudformation create-stack: This is the AWS CLI command used to create a CloudFormation stack.

  • --stack-name ${stack-name}: This flag is used to specify the name of the stack. ${stack-name} is a placeholder for the actual name you would provide.

  • --region ${region}: This flag is used to specify the AWS region in which the stack will be created. ${region} is a placeholder for the actual region you would provide.

  • --template-body ${file:--filename.yml}: This flag is used to specify the CloudFormation template that defines the resources of the stack. ${file:--filename.yml} is a placeholder, indicating that the template can be provided either via a file or inline. If provided via a file, --filename.yml would be the name of the file containing the template.

  • --profile ${profile}: This flag is used to specify the AWS CLI profile to use for the operation. ${profile} is a placeholder for the actual profile you would provide.

Overall, this command creates a CloudFormation stack with a specific name, in a specific region, using a CloudFormation template provided either inline or via a file, and utilizing a specific AWS CLI profile.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the aws tool