The `aws-cdk-aws-cloudwatch` library is part of the AWS Cloud Development Kit (CDK) v1, providing Python constructs for provisioning and managing AWS CloudWatch resources, including metrics, alarms, and dashboards. This specific package, version 1.204.0, was released on June 19, 2023. AWS CDK v1 officially reached End-of-Support on June 1, 2023, meaning it no longer receives maintenance, updates, patches, or technical support. Users are strongly recommended to migrate to AWS CDK v2.
pip install aws-cdk.aws-cloudwatch aws-cdk.coreVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a basic AWS CloudWatch alarm using AWS CDK v1. It defines an SQS queue and sets up an alarm that triggers if the number of visible messages in the queue exceeds a specified threshold.
Migrate your CDK applications to AWS CDK v2 immediately. Refer to the official 'Migrating to AWS CDK v2' guide.
After installing `aws-cdk-lib`, update your import statements from `from aws_cdk import aws_service` (v1) to `from aws_cdk import aws_service` (v2), ensuring `aws_service` is imported from `aws_cdk-lib`. The `constructs` package is now a separate dependency.
Run `cdk bootstrap` with the AWS CDK v2 CLI installed (globally or locally via `npx aws-cdk bootstrap`). Ensure your CLI version is up-to-date with your `aws-cdk-lib` version.
Utilize CDK's context system, environment variables, or AWS SSM Parameter Store/Secrets Manager to dynamically reference values. Specify `env` property in your stacks for clarity.