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.979.tar.gz
(3.9 MB
view details)
Built Distribution
File details
Details for the file cdk_common-2.0.979.tar.gz
.
File metadata
- Download URL: cdk_common-2.0.979.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65417051fde5138e959c20bd24636f39c6a9acbac14bce3c4481a06a8f9ed255 |
|
MD5 | 97a39e7e304dd7d025335c0e967c4eea |
|
BLAKE2b-256 | 5550775d5db145b7d001dd66017070cf47dcd4e6eb9ad9162618c2f6062aee04 |
File details
Details for the file cdk_common-2.0.979-py3-none-any.whl
.
File metadata
- Download URL: cdk_common-2.0.979-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.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2058fdcd70a38759ae648c6ac84111360e6f9e64bc0b615b92317031a49f200 |
|
MD5 | b1baa06347120044bad32c1d85adf3b4 |
|
BLAKE2b-256 | 883b02fc0c11927c6154e149f81adfa8084d2707190b5dc6f14e23374a954b36 |