--- id: aws-cdk-aws-logs version: "1.204.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.aws-logs — The CDK Construct Library for AWS::Logs License: permissive · Maintenance: active · Downloads: 186.5K/mo ## What it is and what it does This package provides AWS CDK v1 constructs for defining CloudWatch Logs infrastructure in Python. It lets you declare log groups with configurable retention periods, set up log stream subscriptions to Lambda or Kinesis, create metric filters to extract metrics from logs, and manage resource policies for cross-service access. The constructs generate CloudFormation templates that AWS deploys on your behalf. The library integrates with other AWS CDK modules (IAM, KMS, S3, CloudWatch) to handle encryption, permissions, and monitoring. However, AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer maintained; the AWS team recommends migrating to AWS CDK v2 for new projects and existing deployments. Use it for: - Define log groups with specific retention policies (e.g., one week) in infrastructure-as-code templates - Route filtered log events from CloudWatch to Lambda functions or Kinesis streams for downstream processing - Extract numeric values from JSON-structured logs and emit them as CloudWatch metrics for alarming - Encrypt log group data with customer-managed KMS keys for compliance requirements - Manage log retention for log groups auto-created by AWS services like Lambda using LogRetention construct ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides AWS CDK constructs for creating and managing CloudWatch Logs resources, including log groups, streams, retention policies, subscriptions, and metric filters. No—this is AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer updated. For new projects, use AWS CDK v2 instead. For existing v1 deployments, plan a migration to v2 to maintain security and feature support. ## Install pip install aws-cdk-aws-logs uv add aws-cdk-aws-logs poetry add aws-cdk-aws-logs ## Installing aws-cdk.aws-logs Before you install: Low install friction with a pure-Python wheel. However, this is AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer being updated; users should migrate to AWS CDK v2 instead. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install aws-cdk.aws-logs from aws_cdk import aws_logs as logs from aws_cdk import core stack = core.Stack() log_group = logs.LogGroup(stack, "MyLogGroup", retention=logs.RetentionDays.ONE_WEEK ) Requires AWS CDK v1 core library; AWS CDK v1 is end-of-support as of 2023-06-01 and v2 is recommended for new projects. Verify before relying: - Whether existing v1 projects can safely remain on this package or face security/compatibility risks post-EOL - Migration path complexity and effort for moving from v1 to v2 constructs ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 186.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cloudwatch logs cdk constructs, aws log group infrastructure as code, cdk log retention management, cloudwatch metric filters cdk, aws logs subscription filters, aws-cdk, end-of-life, infrastructure-as-code [View on SkillFed](https://skillfed.io/packages/aws-cdk-aws-logs) · [View on PyPI](https://pypi.org/project/aws-cdk-aws-logs/)