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개 답변
1
수락된 답변

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
답변함 한 달 전
  • 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
전문가
답변함 한 달 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠