Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

aws sts assume-role --role-arn arn:aws:iam::123456789012:role/xaccounts3access --role-session-name s3-access-example OUTPUT { AssumedRoleUser: { AssumedRoleId: AROA3XFRBF535PLBIFPI4:s3-access-example, Arn: arn:aws:sts::123456789012:assumed-role/xaccounts3access/s3-access-example }, Credentials: { SecretAccessKey: , SessionToken: AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=, Expiration: 2016-03-15T00:05:07Z, AccessKeyId:

aws sts assume-role --role-arn arn:aws:iam::123456789012:role/xaccounts3access --role-session-name s3-access-example

OUTPUT

{    "AssumedRoleUser": {        "AssumedRoleId": "AROA3XFRBF535PLBIFPI4:s3-access-example",        "Arn": "arn:aws:sts::123456789012:assumed-role/xaccounts3access/s3-access-example"    },    "Credentials": {        "SecretAccessKey": "",        "SessionToken": "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",        "Expiration": "2016-03-15T00:05:07Z",        "AccessKeyId": "ASIAJEXAMPLEXEG2JICEA"    }}

I would like a shell script that will output just thefollowing

AWS_ACCESS_KEY_ID=9drTJvcXLB89EXAMPLELB8923FB892xMFI

AWS_SESSION_TOKEN=AQoXdzEL....cgo5OytwU

AWS_SECRET_ACCESS_KEY=ASIAJEXAMPLEXEG2JICEA

So I would like to parse out those values and store them likeyou the example you see above.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

=+a. Find the value today of each alternative.

Answered: 1 week ago