Copilot-cli: Request to contributing code to support multiple profiles.

Created on 4 Sep 2020  路  2Comments  路  Source: aws/copilot-cli

copilot init expects default profiles to be configured. It would be great to support multiple profiles. I really require this feature as I work with multiple clients. I end up accidentally running a task against different client's AWS Creds.

So I plan to contribute this feature. I can submit a PR for the same.

Here is how I would go about this:

  1. copilot init will take a --profile <PROFILE_NAME> argument. When --profile flag is not given , it will default to default
  2. The same flag will be accepted by copilot [app/svc/env] init with the same behavior.

I just want your inputs on one more thing. Is it okay to save this profile info in copilot/.workspace file?

It would be something like this:

application:my-awesome-app-name
profile:my-aws-cli-profile

If not, where else would you guys suggest to put this info in?

Most helpful comment

Keep in mind that you can always override default with the AWS_PROFILE environment variable, e.g. AWS_PROFILE=foo copilot init.

All 2 comments

Keep in mind that you can always override default with the AWS_PROFILE environment variable, e.g. AWS_PROFILE=foo copilot init.

Holy Cow, I did not know that is how it worked. Thanks for pointing out. Then I think this resolves my issues as well. I will close this Issue. Then I think we should update this is docs as well. The Docs made it seem like it supports only default profile. Thanks for the info.

Was this page helpful?
0 / 5 - 0 ratings