Skip to content

LOG-1505: SQS3script.py bug #89

@so0k

Description

@so0k

Some users may have multiple AWS profiles, which causes their credential file to look as follows:

[default]
aws_access_key_id = MY_DEFAULT_ACCOUNT
aws_secret_access_key = MY_DEFAULT_SECRET

[personal]
aws_access_key_id = MY_PERSONAL_ACCOUNT
aws_secret_access_key = MY_PERSONAL_SECRET

the following lines may cause "Unauthorized" errors while running the script:

with open(os.environ['HOME'] + '/.aws/credentials') as f:
    for line in f:
        if "aws_access_key_id" in line:
             access_key = line.split("=",1)[1].strip()
        if "aws_secret_access_key" in line:
             secret_key = line.split("=",1)[1].strip()

Better would be if the python script is migrated to use Boto3 Configuration

However - As an alternative, I suggest the use of the following Terraform configuration: https://github.com/honestbee/loggly-elb-infra

This configuration is more robust and easier customisable for end users.

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