Skip to content

aws inventory script not working for customer using 2FA access #110

@kathywan

Description

@kathywan

customer uses MFA for all their AWS account access. They have local set up that sets environment variables (list below) for terminal sessions. Running the inventory script like ./lw_aws_inventory.sh -o OrganizationAccountAccessRole -p lsnetsinger -r us-east-1 threw error for getCallerIdentity API call. Also confirmed script worked fine once MFA turned off.

Request to improve the script so these variables should take precedence for access AWS account if present in the environment.

export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
export AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions