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
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.1.20.tar.gz
(4.0 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdk_common-2.1.20.tar.gz.
File metadata
- Download URL: cdk_common-2.1.20.tar.gz
- Upload date:
- Size: 4.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70e3920008458ade06e63f56da8b6a3087d19e66d59b619cb799e2bb2559c0e1
|
|
| MD5 |
c28644d08e7e8668b754542bfd4831ad
|
|
| BLAKE2b-256 |
6837532a1ab0802d482bb86dce716bef357c48e2d59b2f8026698819bb9947b9
|
File details
Details for the file cdk_common-2.1.20-py3-none-any.whl.
File metadata
- Download URL: cdk_common-2.1.20-py3-none-any.whl
- Upload date:
- Size: 4.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
792025186468ad749e64fe70cda9fc77401e39745c4c93f005b1843c4119c8ae
|
|
| MD5 |
c58eef0df8b1641f924e2a1054c92346
|
|
| BLAKE2b-256 |
8b7b95973acd51496f11c6710b6aa2da47f9dfc9cec8c5894b952cd46e1217c6
|