aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.6k stars 4.14k forks source link

cloudformation package should append profile name to deploy command #3083

Open bbendick opened 6 years ago

bbendick commented 6 years ago

If the user uses the --profile flag during the package command, that flag should be echoed in the resulting deploy command that is issued. For example:

aws cloudformation package --template-file cloudformation/sam.yaml --output-template-file b.yaml --s3-bucket sam-bucket --s3-prefix sam --profile sam-app

should produce

Successfully packaged artifacts and wrote output template to file b.yaml.
Execute the following command to deploy the packaged template
aws cloudformation deploy --template-file b.yaml --profile sam-app --stack-name <YOUR STACK NAME>
stealthycoin commented 6 years ago

@sanathkr thoughts?

sanathkr commented 6 years ago

Oh yeah, this is a good feature request. @bbendick Would you be able to send a quick Pull Request? It should be easy to capture AFAIK

ashishbharthi commented 4 years ago

/assign

tim-finnigan commented 3 years ago

Can confirm this is still the behavior. Here is the code: https://github.com/aws/aws-cli/blob/develop/awscli/customizations/cloudformation/package.py#L33-L41

I'm not sure if we want to establish a precedent for passing configure options like --profile in cases like this though.