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.1004.tar.gz
(3.9 MB
view details)
Built Distribution
File details
Details for the file cdk_common-2.0.1004.tar.gz
.
File metadata
- Download URL: cdk_common-2.0.1004.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 | a25683cbf883f9ce56052ee7158fcfdbd41ac3d3948663d6838c09ccc9514e8f |
|
MD5 | 1eecb393ef5b8648e78bb8145efdd050 |
|
BLAKE2b-256 | d20bb700acc9d2b310bd5c91b19861982dac4b760e715dd82091252ab6fe6e00 |
File details
Details for the file cdk_common-2.0.1004-py3-none-any.whl
.
File metadata
- Download URL: cdk_common-2.0.1004-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 | 77b3419800ba6f712ff8e45bb6fe56d7cc33c80b55759159ddeb3162c2482342 |
|
MD5 | d61152d6f07f3e2234b153dfb9528d6f |
|
BLAKE2b-256 | 2595cc77032541826c2c1faa01601cfa80d9e646058c356037662e41b990bcc8 |