Code Monkey home page Code Monkey logo

aws-export-credentials's People

Contributors

benkehoe avatar jweyrich avatar mckornfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aws-export-credentials's Issues

Add note about `aws configure export-credentials`

After merging and releasing aws/aws-cli#7398, I believe aws configure export-credentials should be the recommended solution. It would be worth to note in the README.md that aws-export-credentials is either a legacy solution (is it?) or highlight differences between these two approaches.

Forcing update

Any way to force an update after creds are already exported to the cred files?

I have creds with expiration time and needs to be refreshed but the tool doesn't seem to do that if cred files are already present. There is a --refresh option but i think that may be for something else.

Profile region is not propagated with --exec

Currently, aws-export-credentials --profile my-profile --exec aws lambda list-functions will fail because the subprocess cannot find a region to use. aws-export-credentials should determine the region, if one is set, on the session, and pass it in to the subprocess as AWS_DEFAULT_REGION.

I'm not clear if it should be included for --env or --credentials-file-profile

Change expiration variable name

The proper environment variable for credential expiration is AWS_CREDENTIAL_EXPIRATION, supported in botocore, but I was unaware of that and named it AWS_CREDENTIALS_EXPIRATION. So that needs to be changed. Also update the field for the credentials file option, though that is not at all supported as far as I'm aware.

Does it work with assume-role?

aws --profile mine sts assume-role --role-arn "arn:aws:iam::XYZ:role/ViewLogsPlease" --role-session-name ViewOne
{
    "Credentials": {
        "AccessKeyId": "REDACTED",
        "SecretAccessKey": "REDACTED",
        "SessionToken": "REDACTED",
        "Expiration": "2021-08-17T09:56:17+00:00"
    },
    "AssumedRoleUser": {
        "AssumedRoleId": "AROARIZSHQ5ZB4BAEOCU2:ViewOne",
        "Arn": "arn:aws:sts::XYZ:assumed-role/ViewLogsPlease/ViewOne"
    }
}

Right now, AFAICT I'm supposed to set this up manually, maddeningly

Add IMDS option

Using Python's build-in web server, we should be able to mimic the EC2 instance metadata server, which would be a convenient way of retrieving credentials for certain situations.

Exporting to credential file throws error

I have the following ~/.aws/config file on an EC2. I know it seems redundant as it isn't assuming a role, but I need the named profile for my use case:

[profile myprofile]
credential_source = Ec2InstanceMetadata
region = us-west-2
output = json

When running aws-export-credentials --credentials-file-profile myprofile I receive the following error:

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/aws-export-credentials", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python3.10/site-packages/aws_export_credentials/aws_export_credentials.py", line 269, in main
    write_values(session, args.credentials_file_profile, values)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/aws_export_credentials/config_file_writer.py", line 54, in write_values
    session.get_config_variable('credentials_file'))
AttributeError: 'Session' object has no attribute 'get_config_variable'

pipx instructions might need to be fleshed out for idiots like myself

Didn't quite grok pipx. I assumed it would install to pwd, but I think it installed into ~/.local/bin... and it still didn't find the module.

pipx run aws_export_credentials
'aws_export_credentials' executable script not found in package 'aws_export_credentials'. Available executable scripts:
aws-export-credentials

Workaround was to use python3 -m pip install --user aws-export-credentials

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.