aws / aws-lambda-snapstart-java-rules

Apache License 2.0
50 stars 7 forks source link

How do I get LogStreamId in snap_start AWS lambda functions #31

Closed ElectricVampire closed 1 year ago

ElectricVampire commented 1 year ago

I used to save my LogStreamId of lambda in database for co-relation of logStreamId with a business event. When I started using AWS Snap_Start feature of AWS lambda logStreamId is set to null and I guess reason is following -

AWS_LAMBDA_LOG_GROUP_NAME, AWS_LAMBDA_LOG_STREAM_NAME – The name of the Amazon CloudWatch Logs group and stream for the function. The AWS_LAMBDA_LOG_GROUP_NAME and AWS_LAMBDA_LOG_STREAM_NAME environment variables are not available in Lambda SnapStart functions.

So my question is how I get cloudwatch logStreamId in SnapStart lambda functions.

valerena commented 1 year ago

Hi. This repository is for the SnapStart bug scanner (SpotBugs rules) and not for the feature itself. We recommend you to ask your question on https://repost.aws/ or directly with AWS Support.