aws-cdk.aws-ec2
The CDK Construct Library for AWS::EC2
Decision gist · record as of 2026-08-14
No, unless you are maintaining an existing CDK v1 codebase. AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated. New projects should use AWS CDK v2 instead. If you are already on v1, plan a migration to v2 rather than starting new work with this package.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later; AWS CDK v1 reached end-of-support on 2023-06-01.
- 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.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.
last release 2023-06-19 (1152 days) · last repo commit 2026-08-14 · 12,868 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 195,566 downloads/mo, #9,812 on PyPI
Alternatives
Verify before relying
pip install aws-cdk.aws-ec2
import aws_cdk.aws_ec2 as ec2
vpc = ec2.Vpc(self, "VPC")- Whether v1-to-v2 migration tooling or automated upgrade paths are available to ease the transition.
- Current security posture and whether v1 receives any backported security patches post-EOL.
What it is and what it does
aws-cdk.aws-ec2 is the EC2 construct library for AWS CDK v1, a framework for defining cloud infrastructure using Python code. It abstracts EC2 networking primitives—VPCs, subnets (public, private-with-NAT, and isolated), availability zones, security groups, and instances—into reusable constructs that generate CloudFormation templates. You define your infrastructure declaratively, and CDK synthesizes it into deployable AWS resources.
The package is part of the broader AWS CDK ecosystem and depends on core CDK modules (aws-cdk.core, aws-cdk.cx-api, constructs) plus related AWS service libraries (IAM, KMS, S3, CloudWatch, Logs, SSM). It is designed for developers building cloud applications who want to express infrastructure in Python rather than writing CloudFormation YAML or JSON directly.
Use it for
- Define a VPC with public and private subnets, then launch EC2 instances into them as part of a CDK stack.
- Create VPC endpoints and configure subnet selection by availability zone and subnet type for high-availability deployments.
- Provision security groups and network ACLs to control inbound and outbound traffic to EC2 resources.
- Integrate EC2 networking with other AWS services by specifying VPC and subnet configuration in a single CDK app.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, unless you are maintaining an existing CDK v1 codebase.
AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated. New projects should use AWS CDK v2 instead. If you are already on v1, plan a migration to v2 rather than starting new work with this package.
Install
aws-cdk-aws-ec2 on PyPI
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.
Requires Python 3.7 or later; AWS CDK v1 reached end-of-support on 2023-06-01.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install aws-cdk.aws-ec2
import aws_cdk.aws_ec2 as ec2
vpc = ec2.Vpc(self, "VPC")
Verify before relying
- Whether v1-to-v2 migration tooling or automated upgrade paths are available to ease the transition.
- Current security posture and whether v1 receives any backported security patches post-EOL.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release ~=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 15 packagesaws-cdk.aws-cloudwatchaws-cdk.aws-iamaws-cdk.aws-kmsaws-cdk.aws-logsaws-cdk.aws-s3-assetsaws-cdk.aws-s3aws-cdk.aws-ssmaws-cdk.cloud-assembly-schemaaws-cdk.coreaws-cdk.cx-apiaws-cdk.region-infoconstructsjsiipublicationtypeguard |
| Maintenance | Actively maintained 1,152 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 195,566 / month, #9,812 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 7 - InactiveFramework :: AWS CDKFramework :: AWS CDK :: 1Intended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed |
Evidence: aws_cdk.aws_ec2-1.204.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “aws ec2 infrastructure as code”
- aws-cdk.aws-ec2Provides AWS CDK constructs for defining EC2 networking and compute…
- aws-cdk.aws-ecsProvides AWS CDK constructs for defining and managing Amazon ECS…
- cdk-gitlab-runnerDefines AWS infrastructure for GitLab Runner using AWS CDK, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also aws-cdk.aws-batch · aws-cdk.aws-ecs · aws-cdk.aws-efs · aws-cdk.aws-neptune-alpha · aws-cdk.aws-servicediscovery · cdk-aurora-globaldatabase · ec2-metadata · aws-cdk.aws-fsx · aws-cdk.aws-route53 · aws-cdk.aws-redshift-alpha