Common AWS CDK librarys.
Project description
Welcome to cdk-common
This Constructs Library will collection of useful function
and class
for AWS CDK.
Install
Use the npm dist tag to opt in CDKv1 or CDKv2:
// for CDKv2
npm install cdk-common
or
npm install cdk-common@latest
// for CDKv1
npm install cdk-common@cdkv1
💡💡💡 please click here, if you are using aws-cdk v1.x.x version.💡💡💡
AWS Managed Policies enum
import * as cdk from 'aws-cdk-lib';
import { AWSManagedPolicies } from 'cdk-common';
import { Construct } from 'constructs';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'integ-default', { env });
export class IntegDefault extends Construct {
constructor(scope: Construct, id: string ) {
super(scope, id);
const role = new iam.Role(this, 'iamrole', {
assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
});
// Use this way.
role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName(AWSManagedPolicies.AMAZON_SSM_MANAGED_INSTANCE_CORE));
// Not this way.
role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore'));
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk_common-2.0.953.tar.gz
(3.9 MB
view details)
Built Distribution
File details
Details for the file cdk_common-2.0.953.tar.gz
.
File metadata
- Download URL: cdk_common-2.0.953.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9bea2ef23bbcab2803ecad368065a6a440b84b6c43f9dc9865f213403e4b536 |
|
MD5 | 4fb4c49409156cc2a26fe8f8ba3123ca |
|
BLAKE2b-256 | e87676f51bffad6d79782399d95d32256d39d71be9711a5107508ed447b49072 |
File details
Details for the file cdk_common-2.0.953-py3-none-any.whl
.
File metadata
- Download URL: cdk_common-2.0.953-py3-none-any.whl
- Upload date:
- Size: 3.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52d4410635762ed3a015f6bdd2e53dc49414b7cf1a33eba1b9045e4e48f754cc |
|
MD5 | 8657706620657b40cc978b5e4b372aa4 |
|
BLAKE2b-256 | bea5650eca24d4f5fcdeabbde95f8941745a1b3b58613ca4c85248ae0ad95fa2 |