Amazon CloudWatch Logs Insights saved queries now support parameters, allowing you to pass values to reusable query templates with placeholders. This eliminates the need to maintain multiple copies of nearly identical queries that differ only in specific values such as log levels, service names, or time intervals.
You can define up to 20 parameters in a query, with each parameter supporting optional default values. For example, you can create a single template to query logs by severity level (such as ERROR or WARN) and pass different service names each time you run it. To execute a query with parameters, invoke it using the query name prefixed with $ and pass your parameter values, such as $ErrorsByService(logLevel=”ERROR”, serviceName=”OrderEntry”). You can also use multiple saved queries with parameters together for complex log analysis, significantly reducing query maintenance overhead while improving reusability.
Saved queries with parameters are available in all commercial AWS regions. You can create and use saved queries with parameters using the Amazon CloudWatch console, AWS Command Line Interface (AWS CLI), AWS Cloud Development Kit (AWS CDK), and AWS SDKs. To learn more, see the Amazon CloudWatch Logs documentation.
Categories: general:products/amazon-cloudwatch,marketing:marchitecture/management-and-governance,general:products/amazon-cloudwatch-logs
Source: Amazon Web Services
Latest Posts
- MC1422074: Microsoft 365 Copilot Adds Option for OpenAI-Operated Models via New Admin Setting

- Amazon SageMaker HyperPod now supports AMI-based node lifecycle configuration for Slurm clusters using continuous provisioning

- MC1423103: Copilot Notebooks Adds Support for Markdown (.md) Files as Reference Sources

- MC1423108: Microsoft Entra Improves Authenticator Passkey Restore Experience on iOS






