Skip to content

[v2] Add the ability to export AWS environment variables in a shell #4668

@rnhurt

Description

@rnhurt

Some CLI tools (ie. awslogs, Ansible) require (or at least work better) with the standard AWS_ environment variables. It would be nice to be able to export these env vars in a terminal in a quick and easy fashion.

For example, I want to use awslogs to watch my CloudWatch log stream. It supports "profiles" but not the new aws2 profiles. So, something like this won't work:

$ awslogs groups --profile myaccount-adminaccess
You've found a bug! Please, raise an issue attaching the following traceback 
 https://github.com/jorgebastida/awslogs/issues/new
 ....

However, if I were to be able to export the env_vars from aws2, I could use these tools in a more native fashion:

 $ aws2 --profile myaccount-adminaccess export
   AWS_ACCESS_KEY_ID=afsdasfasfasfasfasfasf
   AWS_SECRET_ACCESS_KEY=23432423234244342
   AWS_SESSION_TOKEN=234lj234jkl234lkj24ljk234klj234
 $ awslogs group
 /aws/codebuild/test
 /aws/lambda/mylambda
 ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p2This is a standard priority issuev2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions