manheim / awssume Goto Github PK
View Code? Open in Web Editor NEWrubygem for running a command with AWS AssumeRole credentials
License: MIT License
rubygem for running a command with AWS AssumeRole credentials
License: MIT License
Hi,
I love this gem btw. Make my life alot easier. I'm having the following issue when I use aws query parameter and can't seem to find an easy resolutions. Any help would be appreciated
awssume aws --output text lambda list-functions --query 'Functions[?starts_with(FunctionName, `MY_FUNCTION_NAME`) == `true`].FunctionName'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `AWS_ACCESS_KEY_ID='*******' AWS_EXPIRATION='2017-08-16 19:53:49 UTC' AWS_SECRET_ACCESS_KEY='***********' aws --output text lambda list-functions --query Functions[?starts_with(FunctionName, `MY_FUNCTION_NAME`) == `true`].FunctionName'
Currently if awssume is executed with all the configuration it needs but the 'command to execute' returns a non zero exit status, awssume will still return a 0 exit status. This could be problematic for things like Jenkins jobs that pass or fail based on the exit status of the command executed.
Could be used in place of the existing assume_role
call: https://github.com/manheim/awssume/blob/master/lib/awssume/adapter/aws_client.rb#L14
See: https://github.com/aws/aws-sdk-ruby#supported-services
Looks like awssume
only depends on aws-sdk-core
but includes the full aws-sdk
gem which drastically increases bundle time.
I came from ticket hashicorp/terraform#1275, seems your gem need seperate profile files. I prefer to follow the standard AWS CLI (Command Line Interface) settings to read exist .aws/credentials
and .aws/config
.
.aws/config supports profile and defines as below:
[profile stag]
region = us-east-2
source_profile = default
role_arn = arn:aws:iam::xxxx:role/CrossAccount
[profile prod]
region = us-east-1
source_profile = default
role_arn = arn:aws:iam::xxxx:role/CrossAccount
Why we need manage two or more aws api key configurations or feed it via command line? Make it simple and no duplication.
source_profile
can limit which account to be used.
So we should have something set as below
awssume -profile stag <terraform command>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.