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

AWS Managed Policies enum

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

Uploaded Source

Built Distribution

cdk_common-1.0.261-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file cdk-common-1.0.261.tar.gz.

File metadata

  • Download URL: cdk-common-1.0.261.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for cdk-common-1.0.261.tar.gz
Algorithm Hash digest
SHA256 651767995b95caf4b6436b670f0cbe4a511f18b473a57e621928c6fb58a83c35
MD5 93a49aefdf17bbc41cbc08f494db96d0
BLAKE2b-256 0ab6ed2585f6733342f1503714a20ea3aa6bd8ae2a3269d89f6c197512d987c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_common-1.0.261-py3-none-any.whl
Algorithm Hash digest
SHA256 fd736570f78d0f928c1eddae1472789c4e8f281c2a1831c4806b939ced3b6208
MD5 440c37e7bcd592b09cfb171823046593
BLAKE2b-256 db9da82e6d6be23a6fc62043bbc2a31f3af481468a3b2bb0f9ac29e5fa42c6c8

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