linux_wiki:cft_deploy_via_cli

CFT: Deploy Via CLI

General Information

Deploying Cloudformation Templates via AWS CLI.

Checklist

  • AWS CLI configured
  • Cloudformation templates created

Deploy

CFTs can be deployed via aws-cli, depending upon environment.

Examples

  • Deploying a s3 bucket
    aws cloudformation create-stack --stack-name s3-mynewbucket --template-body file://s3-mynewbucket.json --parameters ParameterKey="ProjectTag",ParameterValue="MyProject" ParameterKey="EnvironmentName",ParameterValue="dev"
  • Deploying a security group, passing in parameters to the CFT
    aws cloudformation create-stack --stack-name mysgtest --template-body file://sg_ssh.json --parameters ParameterKey="ProjectTag",ParameterValue="MyProject" ParameterKey="EnvironmentName",ParameterValue="dev"
  • Deploying an IAM managed role (note the required capabilities argument)
    aws cloudformation create-stack --stack-name iam-jenkins --template-body file://iam_role_jenkins.json --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM

  • linux_wiki/cft_deploy_via_cli.txt
  • Last modified: 2019/06/25 20:20
  • by billdozor