Closed Bug 1600995 Opened 5 years ago Closed 4 years ago

Please grant jlorenzo@mozilla.com and mtabara@mozilla.com access to lambda workers

Categories

(Cloud Services :: Operations: Miscellaneous, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mtabara, Assigned: oremj)

References

Details

Every now and then lambda workers we use for maven.mozilla.org/ fail and we need to debug the logs. It'd be great if we could get Read-Only access there, at least.

Thank you!

Blocks: 1593278
Assignee: nobody → oremj

Access granted. You can grab the logs via the api with something like boto3 or you can use the aws cli. The log groups are:

* /aws/lambda/maven-default-lambda-Lambda-RKY0L6BMZES0
* /aws/lambda/maven-default-lambda-copy-Lambda-EKVLR40ML773
* /aws/lambda/maven-default-lambda-metadata-Lambda-1KYS6S4IVI63B
* /aws/lambda/maven-snapshots-lambda-copy-Lambda-UBFRT5FJKU0Z
* /aws/lambda/maven-snapshots-lambda-metadata-Lambda-1UPPXBH6MGKJF
* /aws/lambda/us-east-1.maven-default-lambda-edge-ResponseLambda-Y88QRPWNE373
* /aws/lambda/us-east-1.maven-snapshots-lambda-edge-ResponseLambda-1GLCQ7DGO0PU1
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Hey Jeremy, could you guide us a bit on how to access these logs?

Thought initially they are stored as S3 buckets but reading more into the AWS docs, seems like AWS lambda functions are associated with CloudWatch Logs and in order to access those logs we need to use aws logs.

I've tried to run:

aws logs get-log-events --log-group-name /aws/lambda/us-east-1.maven-default-lambda-edge-ResponseLambda-Y88QRPWNE373 --log-stream-name /aws/lambda/us-east-1.maven-default-lambda-edge-ResponseLambda-Y88QRPWNE373

but also to aws lambda invoke and aws logs describe-log-groups but all failed with Could not connect to the endpoint URL: "https://logs.use1.amazonaws.com/"

Are the logs stored in a different region?

Flags: needinfo?(oremj)

You might want to try something like https://github.com/jorgebastida/awslogs instead (brew installable). The awscli doesn't have a great abstraction for fetching logs.

Example:
awslogs get /aws/lambda/maven-snapshots-lambda-metadata-Lambda-1UPPXBH6MGKJF ALL -s1w

Region should be set to us-west-2 for all but the us-east-1. logs.

Flags: needinfo?(oremj)

Turns out I was using the abbreviated form use1|usw2 instead of us-west-2/us-east-1. Doh :(
I'm in and was able to query for some data.
Thanks Jeremy again for your help!

I confirm I was able to get the logs like shown in comment 3. I needed to add a few more parameters, notably to pass credentials in.

Status: RESOLVED → VERIFIED
See Also: → 1800611
You need to log in before you can comment on or make changes to this bug.