By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Multiple region support in dimensions for a CloudFront distribution Lambda@Edge metrics in CloudWatch

0

When viewed Lambda@Edge metrics via monitoring view for a distribution via CloudFront portal, there are around 13 regions listed in the metrics graph. But when viewing the same metrics from CloudWatch console only the regions where the data is populated is shown. We are working with APIs to fetch CloudWatch data. So, we need to know whether all the regions is possible for dimension 'Region' or only the 13 regions?

Also, provide documentation for the metrics along with dimensions listed under CloudFront metrics. PFA.

View from CloudFront console Monitoring: Monitoring view

View from CloudWatch console: CloudWatch view

1 Answer
1
Accepted Answer

Hello, thank you for raising your concern in the forum.

I am answering each concern below inline:

Query 1:"So, we need to know whether all the regions is possible for dimension 'Region' or only the 13 regions?"

Even though the portals of Cloudfront monitoring and Cloudwatch monitoring look similar the APIs in the backend are different.

In screenshot of Cloudwatch console- You are viewing Lambda metrics under Cloudfront "per distribution metrics". By design of Cloudwatch service, it only populates the data for the regions where error occurred in Lambda. In the screenshot you shared, error related to "LambdaExecutionError" occured only in regions "ap-south-1", "eu-west-2", "eu-central-1". This means that when user requests landed in regions "ap-south-1", "eu-west-2", "eu-central-1" the lambda code resulted in execution error[1].

[1]About lambda execution error: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-edge-testing-debugging.html#lambda-edge-testing-debugging-execution-errors

Even if you are using APIs to pull data in Cloudwatch, for Lambda@edge you should consider pulling data of the regions where error happened and ignore the regions which are not populated as errors did not happen there. Cloudwatch as a service, does not populate regions where the data for metric being tracked was not available.

Additionally, if you want to know verbose Lambda logs to understand the exact cause of "LambdaExecutionError", from the Cloudfront console monitoring you can follow below:

Cloudfront console---> monitoring---> lambda@edge(select your function)---> on the graphs locate the region--> click "view function logs"--> select the region--> Cloudwatch console will pop up with relevant logs

Reference: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-edge-testing-debugging.html

Query 2 : "Also, provide documentation for the metrics along with dimensions listed under CloudFront metrics. PFA."

Here is the document for metrics populated for Cloudfront service in Cloudwatch metrics section:

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html#monitoring-console.distributions-additional

If you have any questions or concerns please let us know and we will be glad to assist. In case you would require to discuss your specific use case in your account, we would recommend connecting to Premium Support for faster resolution. If you have Business or Enterprise Support Plan you contact AWS Premium Support via phone or chat as soon as you are available following instructions below:

https://repost.aws/knowledge-center/aws-phone-support https://aws.amazon.com/premiumsupport/plans/

answered 8 months ago
profile picture
EXPERT
reviewed 6 months ago

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