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
AWS Managed Policies enum
# Example automatically generated from non-compiling source. May contain errors.
import * as cdk from '@aws-cdk/core';
import { AWSManagedPolicies } from 'cdk-common';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'integ-default', { env });
export class IntegDefault extends cdk.Construct {
constructor(scope: cdk.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-1.0.25.tar.gz
(2.7 MB
view details)
Built Distribution
File details
Details for the file cdk-common-1.0.25.tar.gz
.
File metadata
- Download URL: cdk-common-1.0.25.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3a4d65f81f23dba87a6ff0fd5a6cc63f4085eeebbb059a6cc6dc283afd2e0c1 |
|
MD5 | e683b4b048475e23c512e4ded8a73e96 |
|
BLAKE2b-256 | 4463cdc3ab70ff2c2e7dc5c3dc498bf5cace86735ce2b4fa530ac1f588537a86 |
File details
Details for the file cdk_common-1.0.25-py3-none-any.whl
.
File metadata
- Download URL: cdk_common-1.0.25-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae3e98147a9eb89a8d9f007c41a1c1e9dfd6e721275ac9e530a21ec47f746018 |
|
MD5 | 6692aee39cd507f25f531abdeb545370 |
|
BLAKE2b-256 | 103b26f9af601777d76ee9162dad91cb5307fd50f959bc6ce283ef9a1213f7d4 |