-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
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_SECRETthe 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
Labels
No labels