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.53.tar.gz
(3.7 MB
view details)
Built Distribution
File details
Details for the file cdk-common-2.0.53.tar.gz
.
File metadata
- Download URL: cdk-common-2.0.53.tar.gz
- Upload date:
- Size: 3.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70dc97adbc164d1443c0c02b2d88782afd589c7649fb133a6c43cacb11516b87 |
|
MD5 | 80a00b21ea4e8e324bbba134e664a467 |
|
BLAKE2b-256 | 138ae5a39ba4e1d19c1a6329da433f346260806b9514f7eb4ca1ea09c157cfbd |
File details
Details for the file cdk_common-2.0.53-py3-none-any.whl
.
File metadata
- Download URL: cdk_common-2.0.53-py3-none-any.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5b3386f89c16fbdedbc657b79ee72c315a23a175198b3ac24dfa26477c43a1f |
|
MD5 | 5d84026b33dcd300eaa87e595be8d734 |
|
BLAKE2b-256 | 20263d7f7ee883d9d1c777fa4f39b6f31492a8e8a5fda94d7f21732de1197e4f |