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
- Durable Objects, Workers – New Asia-Pacific location hints: apac-ne and apac-se

- Durable Objects – Outbound connections keep Durable Objects alive

- (Updated) Upcoming change: Microsoft 365 Apps SAEC and MEC will unify [MC1274325]
![(Updated) Upcoming change: Microsoft 365 Apps SAEC and MEC will unify [MC1274325] 4 pexels mccutcheon 1148998](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Dynamics 365 Customer Service – Policy strictness control for governance rules [MC1397526]
![Dynamics 365 Customer Service - Policy strictness control for governance rules [MC1397526] 5 pexels pixabay 534174](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)



![(Updated) Upcoming change: Microsoft 365 Apps SAEC and MEC will unify [MC1274325] 4 pexels mccutcheon 1148998](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-mccutcheon-1148998-150x150.webp)
![Dynamics 365 Customer Service - Policy strictness control for governance rules [MC1397526] 5 pexels pixabay 534174](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-534174-150x150.webp)
