CDK SSM Document
AWS CDK L3 construct for managing EC2 Key Pairs.
CloudFormation does not directly support creation of EC2 Key Pairs. This construct provides an easy interface for creating Key Pairs through a custom CloudFormation resource. The private key is stored in AWS Secrets Manager.
Usage
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.core as cdk
from cdk_ec2_key_pair import KeyPair
# Create the Private Key
key = KeyPair(self, "A-Key-Pair",
name="a-key-pair",
description="This is a Key Pair"
)
# Grant read access to a role or user
key.grant_read(some_role)
The private key will be stored in AWS Secrets Manager. The secret name is prefixed with ec2-private-key/, so in this example it will be saved as ec2-private-key/a-key-pair.
Roadmap
- Automated Tests
- Tagging support in a more standard way
Metadata
Release files for cdk-ec2-key-pair 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdk-ec2-key-pair-0.2.1.tar.gz | 26.1 kB | Without provenance | Details for cdk-ec2-key-pair-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdk_ec2_key_pair-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for cdk_ec2_key_pair-0.2.1-py3-none-any.whl |
Total release size: 51.4 kB
Release files / cdk-ec2-key-pair-0.2.1.tar.gz
| Download URL | cdk-ec2-key-pair-0.2.1.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05d53a4b9e3f7287658f30eed8b739d88bd4070db87e4b2429868463c3685691
|
|
BLAKE2b-256 checksum How to use checksums |
88bcbf3d798ad71e6a497e2e4895c5025736893f4612abfce8de32f71ad72a2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Release files / cdk_ec2_key_pair-0.2.1-py3-none-any.whl
| Download URL | cdk_ec2_key_pair-0.2.1-py3-none-any.whl |
|---|---|
| Size | 25.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe27a7b1a4fe7bed5304c5cbbb34b2d2b01dddf2506096c1f963b874bc1bc6af
|
|
BLAKE2b-256 checksum How to use checksums |
85da718b13767d6b3abcd2d8fe0d2af0b50f5db5d9ec97fe07ee7e0164f56163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Security for cdk-ec2-key-pair 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.