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

Uploaded Source

Built Distribution

cdk_common-1.0.963-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdk_common-1.0.963.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for cdk_common-1.0.963.tar.gz
Algorithm Hash digest
SHA256 a9f73d2750d8f1ff51c91ad4f7def969cfa0db9af419d720741a6ebc9d5d546c
MD5 9e31f24adbc247fcc06ba4cb89402468
BLAKE2b-256 04e4c39e9b96fc5b7eff2a3e83568839342bbce42b2f37af76189a7e8090a8c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_common-1.0.963-py3-none-any.whl
Algorithm Hash digest
SHA256 aad5523cf972c16b3f804b7923b35da5f11d4fcd94396d9e13c180b9dc90bbd0
MD5 f25754bb979d2643e4f24f2f51e1e8b9
BLAKE2b-256 eaddc101557a741054b61dd5c47cf1c53b7d468530ac1c3a6085d64901191142

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