Skip to main content

CDK Construct for secrets

Project description


This project is deprecated. The original goal of this construct was to provide an API for creating EC2 Key Pairs. The custom resource provider I used had much more functionality. It turned out this additional functionality was never needed and creating EC2 Key Pairs was overly complicated.

To create EC2 Key Pairs you now can use my new construct: cdk-ec2-key-pair

CDK docs npm version PyPI version NuGet version GitHub

AWS CDK construct to manage secrets. It makes use of a custom resource provider from binxio/cfn-secret-provider.

This package is written in TypeScript and made available via JSII to all other supported languages. Package are available on:

The secret provider can create RSA keys, DSA keys, EC2 key-pairs, IAM user passwords and access keys and generally secrets stored in parameter store or secret store.

All this functionality is provided by the binxio/cfn-secret-provider custom resource.

When it comes to security, you should not trust anyone. By default the secret provider uses the lambda function stored at s3://binxio-public-${AWS_REGION}/lambdas/ You might want to download this file, review its contents and store it in your own bucket or along with your code. You then can create the lambda function from that zip file instead like so:

# Example automatically generated without compilation. See
code = lambda.Code.from_asset(path.join(__dirname, "../"))

secret_provider = secret.Provider(self, "SecretProvider",


There is an example application in ./example showing how to create a new EC2 key pair.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-secrets-0.4.9.tar.gz (96.3 kB view hashes)

Uploaded source

Built Distribution

cdk_secrets-0.4.9-py3-none-any.whl (94.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page