LOG-1505: SQS3script.py bug
so0k opened this issue · 2 comments
so0k commented
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.
mostlyjason commented
Thanks for posting! We also have a new S3 ingestion feature coming out soon that will ingest logs directly in the product without the need for a separate script. Stay tuned!
MichalChomo commented
This is fixed by #125 .