TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

AWS bastions and assume-role

157 pointsby grahar64over 7 years ago

15 comments

gregwebsover 7 years ago
Also take a look at aws-vault [1]. This not only assumes roles but also helps you store your original credentials in an encrypted form rather than a plain text ~&#x2F;.aws&#x2F;credentials file. You do have to configure all assumed roles in ~&#x2F;.aws&#x2F;config<p>They have an exec command but you can also export your credentials to env variables with somethings like<p><pre><code> aws-vault exec &quot;$AWS_PROFILE&quot; -- env | egrep &#x27;^AWS&#x27; | awk &#x27;{print &quot;export &quot; $1}&#x27; </code></pre> [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;99designs&#x2F;aws-vault" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;99designs&#x2F;aws-vault</a>
评论 #15533011 未加载
skrebbelover 7 years ago
I know of no service that is more complex and off putting to newbies than AWS. I mean, wait, I need multiple accounts? Getting my team access to the one account we have took me 3 hours already!<p>No wait, I need a <i>design pattern</i> for how to manage accounts of a SaaS service?<p>I&#x27;m probably not the target audience here but I strongly get the impression that these patterns would not be necessary if AWS would get their shit together in terms of AWS Console UX design.
评论 #15533606 未加载
评论 #15534312 未加载
评论 #15535334 未加载
评论 #15534902 未加载
评论 #15533666 未加载
dantiberianover 7 years ago
In Google Cloud, something like this is mostly unnecessary. The project model scopes resources to a particular project within an organisation, rather than all resources being global to the account. This gives a really good first cut at isolating different environments and projects.
评论 #15532520 未加载
评论 #15567921 未加载
takedaover 7 years ago
I like AWS multiple accounts support it helps securing specific environments, but I don&#x27;t like that going this route increases the cost.<p>Here are some things I don&#x27;t like:<p>1. if you want to use AWS support, you need to purchase it per account, otherwise support will refuse any help that involves anything specific to the account (they will only respond with generic documents)<p>2. with separate account you need to recreate the same components (and therefore pay more) for example if you want internet access on your VPC over IPv4, you need to set up a NAT instance per account, you can&#x27;t for example use VPC peering and use NAT instance on another account<p>3. you are being charged for any data going between accounts even if same AZ is used. Yes, I understand that one can&#x27;t easily tell which AZ is which across accounts since they are randomized per account but still...
评论 #15536639 未加载
评论 #15537087 未加载
fxaguessyover 7 years ago
Great article and nice tool. Switching role and profile with multiple organizations is indeed cumbersome with AWS.<p>We are also developing an open source CLI for AWS named awless (cf. <a href="https:&#x2F;&#x2F;github.com&#x2F;wallix&#x2F;awless" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wallix&#x2F;awless</a>). We currently support easy MFA, profile switch and role assuming in CLI with the &#x27;-p&#x27; flag and are working on extending these features to support multiple organizations. We had multiple issues filed on GitHub which are closely related to this.
xrefover 7 years ago
2018 Hottest AWS Job Postings:<p><pre><code> - Identity-Access-Management Manager - Pricing Oracle - Sysadmin we fired when Moving To The Cloud(tm)</code></pre>
sdfjklover 7 years ago
Poor choice of name, as the term &quot;bastion&quot; is already commonly used in AWS to describe a bastion host for a VPC.
评论 #15533452 未加载
sanddover 7 years ago
Now that I&#x27;m comfortable with the IAM side of things, I will always use multiple accounts. I&#x27;m also beginning to think it&#x27;s valuable to not even limit yourself to a single account per environment. Tools like Terraform become essential, though.<p>I&#x27;ve written about using multiple accounts in combination with CodePipeline to manage Lambda deployments here: <a href="https:&#x2F;&#x2F;medium.com&#x2F;statics-and-dynamics&#x2F;automated-lambda-deployments-with-terraform-codepipeline-a4d2a2019eae" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;statics-and-dynamics&#x2F;automated-lambda-dep...</a>
RoutinePlayerover 7 years ago
Like everyone else, I also wrote a CLI login util in GoLang for multiple AWS account with this &quot;bastion&#x2F;main&quot; account setup: <a href="https:&#x2F;&#x2F;github.com&#x2F;lencap&#x2F;awslogin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lencap&#x2F;awslogin</a> . Simplicity is the main driver. I welcome constructive input.
评论 #15534934 未加载
loxover 7 years ago
We took this approach at 99designs with aws-vault and bastion accounts: <a href="https:&#x2F;&#x2F;99designs.com.au&#x2F;tech-blog&#x2F;blog&#x2F;2015&#x2F;10&#x2F;26&#x2F;aws-vault&#x2F;" rel="nofollow">https:&#x2F;&#x2F;99designs.com.au&#x2F;tech-blog&#x2F;blog&#x2F;2015&#x2F;10&#x2F;26&#x2F;aws-vault...</a>
mavusover 7 years ago
Very well written article with some good advice. We found very early on the need for multiple AWS accounts and managing varying levels of access to all of them has been challenging.<p>I also recommend looking into using SAML with your own login provider, if you have one, to assume individual roles in AWS accounts.
评论 #15535393 未加载
fogettiover 7 years ago
Cool! We do the same but we call it root account instead of bastion account, since bastion is an overloaded term in the AWS universe.
评论 #15533615 未加载
dmikalovaover 7 years ago
This is what we do. Each product has it&#x27;s own prod and qa account.
grabcocqueover 7 years ago
Unless I&#x27;m missing something, isn&#x27;t this whole process made a lot simpler just by using STS?<p>It also works incredibly well with Vault&#x27;s STS backend.
评论 #15532522 未加载
评论 #15532505 未加载
1ba9115454over 7 years ago
As coinbase is a Bitcoin wallet and they transact a lot of money it suprises me that they reveal details of their implementation publicly.<p>Edit - Getting downvoted a lot.<p>Seems that some people think that the expression &#x27;You shouldn&#x27;t rely on security through obscurity&#x27; means that it&#x27;s OK to publish your backend infrastructure.<p>Best practice is defence in depth.<p>That means you secure everything including your implementation details.<p>If a zero day is found in any of their stack, they&#x27;re a google search away from being found for that.
评论 #15532301 未加载
评论 #15532240 未加载
评论 #15532188 未加载
评论 #15534506 未加载
评论 #15532431 未加载
评论 #15532274 未加载
评论 #15536699 未加载
评论 #15532171 未加载