-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Michael Sverdlik edited this page Jul 19, 2020
·
5 revisions
- Open Developer's Console
- Create a new project
- Navigate to Credentials on the left menu and choose to create a new OAuth 2.0 Client
- Choose Android App as the application type (This is not a typo)
- Give the client a name, package name and some dummy SHA1 checksum.
- Write down the client ID.
- In OAuth consent screen menu item, make sure app is Internal
First, you'll need to configure an external identity provider (idp):
- Open IAM console and navigate to the identity providers screen.
- Click Create Provider
- Provider Type: OpenID Connect
- Provider URL: https://accounts.google.com
- Audience: Client ID from GSuite
Next, create a new role that will be assumed via the federated idp:
- Open the [https://console.aws.amazon.com/iam/home?region=eu-west-1#/roles](IAM Roles screen) and click Create Role
- Choose Web Identity as type of trust
- Identity provider: accounts.google.com:aud
- Audience: Client ID as before
- Attach any permissions, tags and create a new role.
- Write down role ARN
In your ~/.aws/config
:
[profile tinytoken]
credential_process = /usr/local/bin/tinytoken -r ROLE_ARN -c CLIENT_ID
Replaced ROLE_ARN and CLIENT_ID with the relevant details.
Run your AWS commands as usual:
aws --profile tinytoken ec2 describe-instances