Deploying from the command line
stackery deploy <stack> <env> <ref>
stackThe name of the stack you want to deploy.
envThe name of the Environment you want the stack to deploy to.
refA branch name, tag, or commit SHA, etc. Note: Deployments are generated from the stack’s remote git repository. Be sure to push any local changes to the remote repository before deploying!
--aws-profile <profileName>Specify the AWS profile to use from your AWS Credentials File. If not provided, you will be prompted to provide your profile or credentials.
--access-key-id <awsAccessKeyID>Provide your AWS Access Key ID directly via the command line rather than using an AWS profile. If set,
--secret-access-keymust also be provided
--secret-access-key <awsSecretAccessKey>Provide your AWS Secret Access KEy directly via the command line rather than using an AWS profile. If set,
--access-key-idmust also be provided
There are a number of ways to provide your AWS credentials to Stackery. In order of priority:
--aws-profile <profileName>flag. No further input will be required from you. We recommend you use this method when running the cli non-interactively.
- If the environment variables
AWS_REGIONare set, you will be asked if you want to use them.
- If you have an AWS Credentials File, you will be asked if you want to use one of them
- Otherwise you will be prompted to enter the
AWS_SECRET_ACCESS_KEYvalues you want to use.
Note that the AWS credentials of the account given must match the AWS account for the environment, or the CLI will throw an error. The AWS account is specified during Environment Creation.
$ stackery deploy myStackName myEnvironmentName myGitRef --aws-profile myProfileName
This command will deploy the myGitRef version of stack myStackName to your myEnvironmentName environment. Execution of the CloudFormation change set will be triggered using local aws credentials stored in the standard ~/.aws/credentials file.