Skip to main content

Common AWS CDK librarys.

Project description

NPM version PyPI version release

Downloads npm PyPI

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.1007.tar.gz (3.9 MB view details)

Uploaded Source

Built Distribution

cdk_common-2.0.1007-py3-none-any.whl (3.9 MB view details)

Uploaded Python 3

File details

Details for the file cdk_common-2.0.1007.tar.gz.

File metadata

  • Download URL: cdk_common-2.0.1007.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

Hashes for cdk_common-2.0.1007.tar.gz
Algorithm Hash digest
SHA256 f963ddf236f98c13fd50a21b2dffe61e8343d6da32405cc2e76a849fc43ef3e6
MD5 2b5aa6417b883ceb8d4fe903cf3906ff
BLAKE2b-256 e217d5a34f9af01fec8012eda497766524524950919f381e2eb08a8aac44d360

See more details on using hashes here.

File details

Details for the file cdk_common-2.0.1007-py3-none-any.whl.

File metadata

File hashes

Hashes for cdk_common-2.0.1007-py3-none-any.whl
Algorithm Hash digest
SHA256 8044aff7b78b4210f373f07a45c485ae3acb265cc386b75b5aeeea05e09acaca
MD5 77ff28d2e70631a36fa74d40598751bd
BLAKE2b-256 80aa0a7c76b631f248cae92c2fed94849110be508a76e57df3840d02d1d07393

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page