News for hackers. Stuff that matters.
Re:Using a single AWS account is a serious risk by eropple on Friday August 07, 2015 @07:26PM (#10025608)
Yeah, this is the way to go. For when I have to use the AWS console, I use separate Chrome profiles for each of my environments, so I don't even have cookies, saved passwords, etc. that might relate to other accounts. (I also use separate Chrome themes in each environment and use a CSS manipulator such that my prod console is in a bright-freaking-red Chrome window with a red background. Blue for test, green for dev.)

For my own AWS accounts, I use a read-only account in the profile and, on the very rare occasion I want to get clicky rather than use awscli to frob something, I'll log out and log back in as my writable-to-IAM user. I have a third user that only has IAM read/write privileges if I have to deal with that service. (I haven't sold my clients on this approach, though.)

Re:Using a single AWS account is a serious risk by icelancer on Friday August 07, 2015 @08:06PM (#10025756)
> use a CSS manipulator such that my prod console is in a bright-freaking-red Chrome window with a red background. Blue for test, green for dev

Ha, I do the same thing. I learned about this from a previous job I had where prod/test webapps were functionally similar but had obnoxious coloring in the header. Very effective.

Re:Using a single AWS account is a serious risk by eropple on Friday August 07, 2015 @08:13PM (#10025781)
Visual indications are so great, aren't they? I do it with terminals, too; prod servers get obnoxious red-background prompts. (Root terms on all my machines look different from unprivileged ones, too.)
Re:Using a single AWS account is a serious risk by tabio on Friday August 07, 2015 @11:24PM (#10026205)
Wow, I can't remember the last time I ran a shell directly on a prod machine. The very thought feels so dirty now.
Re:Using a single AWS account is a serious risk by eropple on Saturday August 08, 2015 @02:21AM (#10026516)
When you inherit your environment and are whipping it into shape, shit happens.
Re:Using a single AWS account is a serious risk by zaroth on Friday August 07, 2015 @11:44PM (#10026245)
Whether it's shell literally, or "shell" as in, the window from which you ultimately perform shell-like things, there's still a place you perform these tasks and knowing when you are in simulation or actual is an important state to track.
Re:Using a single AWS account is a serious risk by jebblue on Saturday August 08, 2015 @11:42AM (#10027552)
How do you know what's really going on on those machines and in their respective environments assuming they are geographically distinct?
Re:Using a single AWS account is a serious risk by tomschlick on Saturday August 08, 2015 @05:20AM (#10026769)
Any advice/tutorials on how to set this up? Ideally I'd like just that ssh session to change the text to red for prod boxes but then go back to my normal iTerm theme after exit...
Re:Using a single AWS account is a serious risk by def- on Saturday August 08, 2015 @06:38AM (#10026884)
In the .bashrc/.zshrc of the remote machine add this:

    echo '\033]11;#440000\007'
On the local machine add this to reset the terminal color:

    ssh () {/usr/bin/ssh "$@"; echo '\033]11;#000000\007'}
Re:Using a single AWS account is a serious risk by eru on Saturday August 08, 2015 @05:44AM (#10026803)
You can muck around with your bashrc, if you use that shell.
Re:Using a single AWS account is a serious risk by icelancer on Friday August 07, 2015 @09:28PM (#10025969)
Hmm good idea. I haven't had any issue with it but it's trivial to change background colors. Probably not a bad idea. Thanks for the tip!
Re:Using a single AWS account is a serious risk by ghufran_syed on Friday August 07, 2015 @09:54PM (#10026032)
Any links to how to do this? My google-fu seems to be failing me. I'm assuming you somehow set things up so it automatically detects the page / content (based on the environment name or instance tags??) and changes the background?
Re:Using a single AWS account is a serious risk by patio11 on Friday August 07, 2015 @10:22PM (#10026096)
Easy way to do this in e.g. Rails:

  <body style="foo bar baz env-#{Rails.environment}">
Then use CSS like you would normally on body.env-production, body.env-development, etc.
Re:Using a single AWS account is a serious risk by hobarrera on Saturday August 08, 2015 @10:20PM (#10029302)
You meant class, not style. But great tip though:

      <body class="foo bar baz env-#{Rails.environment}">
Re:Using a single AWS account is a serious risk by mryan on Saturday August 08, 2015 @04:11AM (#10026674)
One way to do this is to look at the "awsc-login-display-name-account" div, which contains your account ID. You can then alter the look of the page (perhaps making the top header bright red) depending on which account ID is in use.

Could make a nice Chrome extension...

Re:Using a single AWS account is a serious risk by mateuszf on Saturday August 08, 2015 @04:44AM (#10026725)
You can use an extension like Greasemonkey, with a simple script which will extract aws account id and will apply some css based on it.
Re:Using a single AWS account is a serious risk by eropple on Saturday August 08, 2015 @03:31PM (#10028405)
I log into different Chrome profiles that style the same pages differently. Dumb and easy.