Logger
execution.utils.logger
¶
Secure Logger Utility
This module provides a secure logging implementation that sanitizes sensitive data and integrates with AWS Lambda Powertools for structured logging.
logger = SecureLogger()
module-attribute
¶
SecureLogger
¶
Secure logger that sanitizes sensitive data before logging.
Extends AWS Lambda Powertools Logger with data sanitization capabilities to prevent accidental logging of sensitive information like credentials, personal data, or other confidential information.
Attributes:
| Name | Type | Description |
|---|---|---|
_max_length |
Maximum length for string values before truncation |
|
stack_level |
Stack level for location tracking in logs |
get_account_id()
¶
Retrieve the current AWS account ID using STS.
Returns:
| Type | Description |
|---|---|
|
String containing the AWS account ID |