awsweeper icon indicating copy to clipboard operation
awsweeper copied to clipboard

Add Check for AWS Account ID Before Running

Open jaloren opened this issue 5 years ago • 1 comments

A common scenario in AWS deployments is to have a production account and a test account. To ensure that the deployment is only run against the test account, it would be really helpful if the awsweeper could check the account id passed in on the command line or environment variable and then verify that the credentials its using are for that account. If they don't match, then fail before executing.

If this feature sounds worthwhile, I'd be happy to submit a PR for it.

jaloren avatar Oct 16 '19 12:10 jaloren

Hi @jaloren :wave: Sounds like good idea! Go ahead if you like and do a PR.

I usually have account profiles in ~/.aws/credentials with the name prod or dev. This isn't sufficiently safe for you?

jckuester avatar Nov 14 '19 19:11 jckuester