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

Uploaded Source

Built Distribution

cdk_common-1.0.664-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdk-common-1.0.664.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for cdk-common-1.0.664.tar.gz
Algorithm Hash digest
SHA256 f67f843f666b4e21c60213f3a49c38f0fee15a2cbdb8ec6781a9ccd9edd26b2b
MD5 5a5ec290e92fa5446b080f667d6ac1b3
BLAKE2b-256 e864ebb8e1e77ff33d4c31637014c8988e75b3eb6c5e44f57517532308a8f8b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_common-1.0.664-py3-none-any.whl
Algorithm Hash digest
SHA256 28291b26df2db2ea621f111540949f7bb905725c17bbf2b6ff80e5fb1e3ef13d
MD5 31e5fe7fdf46ca986a2178b76f9a4802
BLAKE2b-256 87d75d3a03bb9d3978a2e188606d3020113b6ac593f4d83c690add9f66fce9d9

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