View a markdown version of this page

Monitoring the Secrets Manager extension in AWS Systems Manager Cloud Extensions - AWS Systems Manager

Monitoring the Secrets Manager extension in AWS Systems Manager Cloud Extensions

The extension sends its metrics to CloudWatch. For how to query the metrics and alarm on them, see CloudWatch metrics. After you add the extension to a profile, check the logs of the extension in CloudWatch Logs after your next invocation.

Logs

The extension writes logs through the runtime to stderr. Each log line includes the name of the extension. The logs are JSON in Lambda and text elsewhere. In Lambda, the logs go to CloudWatch Logs. In Lambda, set the log level with the AWS_CLOUDEXTENSIONS_LOG_LEVEL environment variable. The log lines of the extension never include secret values or the server-side request forgery (SSRF) token.

AWS CloudTrail

Requests to the extension don't appear in AWS CloudTrail. When the extension calls Secrets Manager, CloudTrail records the call with a user agent that contains secretsmanager/version.

Extension metrics

The extension publishes the following OpenTelemetry metrics, under the scope cloudwatch.aws/secretsmanager/cloudextensions. The extension adds no dimensions of its own. Cloud Extensions attaches the attributes extension.name and extension.version to each data point.

  • cache.hits - Requests that the extension served from the cache

  • cache.misses - All other requests. This includes requests that waited for the refresh of another request, expired entries that the extension confirmed with DescribeSecret, and failed requests

  • cache.entry.count - The number of cached entries across all roles