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.

AWS Managed Policies enum

# Example automatically generated. See https://github.com/aws/jsii/issues/826
from cdk_common import AWSManagedPolicies
app = cdk.App()

stack = cdk.Stack(app, "integ-default", env=env)

class IntegDefault(cdk.Construct):
    def __init__(self, scope, id):
        super().__init__(scope, id)

        role = iam.Role(self, "iamrole",
            assumed_by=iam.ServicePrincipal("ec2.amazonaws.com")
        )
        # Use this way.
        role.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name(AWSManagedPolicies.AMAZON_SSM_MANAGED_INSTANCE_CORE))

        # Not this way.
        role.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("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-0.0.45.tar.gz (1.0 MB view hashes)

Uploaded Source

Built Distribution

cdk_common-0.0.45-py3-none-any.whl (1.0 MB view hashes)

Uploaded Python 3

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