default cloudwatch loggroup name contains undesired region code.

0

A default logroup name for lambda is expected to be aws/lambda/<function-name>. But I find region code us-east-1 , placed before function name, loggroup name appears like aws/lambda/us-east-1.<function-name>. This issue is with one lambda loggroup Other lambda loggroups are fine. I tried to use LoggingConfig in cft templates to correct loggroup. a new loggroup with correct name created but lambda don't sends logs in that. still uses loggroup with region code. Please suggest the probable root casue for this bahaviour.

2 Answers
1
Accepted Answer

Hi,

Is that a Lambda@Edge function? See Lambda@Edge logs and Aggregating Lambda@Edge Logs for more details if my guess was correct.

Regards.

AWS
answered 13 days ago
  • Hi, Thanks for your inputs. Yes, It is Lambda@Edge function. As documentation suggests, for edge functions region code in loggroup name seems reasonable. Thanks again for clearing it.

0

Hello.

Can you confirm that the output destination log group has been changed from the console of the target Lambda?
https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html

Also, is the IAM policy attached to the Lambda IAM role configured to output logs to a custom log group?

profile picture
EXPERT
answered 13 days ago
  • Hi, Thanks for looking into the issue. Yes, in console loggroup name is updated for that lambda (inside monitoring and operations.. tab ). AWS managed AWSLambdaBasicExecutionRole policy is associated with lambda role. policy contains createLoggroup, createlogstream, PutLogEvents actions for all resources.
    Still lambda sends logs in aws/lambda/us-east-1.<function-name> loggroup.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions