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.52.tar.gz
(3.7 MB
view details)
Built Distribution
File details
Details for the file cdk-common-2.0.52.tar.gz
.
File metadata
- Download URL: cdk-common-2.0.52.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 | 4696d3c54334be83eb762e90ce7e842c947c73f05fe33c93ea46b60d6689efeb |
|
MD5 | a5daa2c8015da8868e49d9f539b9ebc2 |
|
BLAKE2b-256 | a20ea526f07704061839d7ca19970df79e8b6c5014e4dabff304df5081ebcf4b |
File details
Details for the file cdk_common-2.0.52-py3-none-any.whl
.
File metadata
- Download URL: cdk_common-2.0.52-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 | 0c3a62288bade87997364843b9f53a5c8718f997a7c32434901b5a511564b431 |
|
MD5 | 65b79cf2e52c1cdee09e587c2c5b71d0 |
|
BLAKE2b-256 | aaea6d61a94eb8290b9d565ff56bea58495a46d111d1c62d7bdcb2962f3e0a42 |