Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for CloudWatch Logs Cost Reduction for Lambda
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[LOG_INGESTION_RATE] - ✦
[RETENTION_POLICY] - ✦
[LOG_LEVEL_STRATEGY]
cloudwatch-logs-cost-optimization.txt
Analyze the log data volume for a high-frequency Lambda function with [LOG_INGESTION_RATE]. Propose a 'Dynamic Logging' interceptor that adjusts [LOG_LEVEL_STRATEGY] based on error rates or specific request headers. Recommend an optimized [RETENTION_POLICY] and suggest using CloudWatch Logs Insights over standard streams to reduce searching costs. Calculate the potential savings by filtering out non-essential verbose logs before they reach the ingestion endpoint.
Example Output
"The AI would generate a middleware function to filter logs and a CloudWatch pricing model showing how much can be saved by switching to infrequent access logs."