cdk-common


Namecdk-common JSON
Version 2.0.1228 PyPI version JSON
download
home_pagehttps://github.com/neilkuan/cdk-common.git
SummaryCommon AWS CDK librarys.
upload_time2025-07-10 00:21:05
maintainerNone
docs_urlNone
authorNeil Kuan<guan840912@gmail.com>
requires_python~=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![NPM version](https://badge.fury.io/js/cdk-common.svg)](https://badge.fury.io/js/cdk-common)
[![PyPI version](https://badge.fury.io/py/cdk-common.svg)](https://badge.fury.io/py/cdk-common)
[![release](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml/badge.svg)](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml)

![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)
![npm](https://img.shields.io/npm/dt/cdk-common?label=npm&color=orange)
![PyPI](https://img.shields.io/pypi/dm/cdk-common?label=pypi&color=blue)

# Welcome to `cdk-common`

This Constructs Library will collection of useful `function` and `class` for AWS CDK.

## Install

```bash
Use the npm dist tag to opt in CDKv1 or CDKv2:

// for CDKv2
npm install cdk-common
```

### AWS Managed Policies `enum`

```python
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'));
  }
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/neilkuan/cdk-common.git",
    "name": "cdk-common",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Neil Kuan<guan840912@gmail.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e4/45/2c3e10ecd36c06d1c834cba7f98a1f05266fdddab8aae91dfe10b707cdde/cdk_common-2.0.1228.tar.gz",
    "platform": null,
    "description": "[![NPM version](https://badge.fury.io/js/cdk-common.svg)](https://badge.fury.io/js/cdk-common)\n[![PyPI version](https://badge.fury.io/py/cdk-common.svg)](https://badge.fury.io/py/cdk-common)\n[![release](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml/badge.svg)](https://github.com/neilkuan/cdk-common/actions/workflows/release.yml)\n\n![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)\n![npm](https://img.shields.io/npm/dt/cdk-common?label=npm&color=orange)\n![PyPI](https://img.shields.io/pypi/dm/cdk-common?label=pypi&color=blue)\n\n# Welcome to `cdk-common`\n\nThis Constructs Library will collection of useful `function` and `class` for AWS CDK.\n\n## Install\n\n```bash\nUse the npm dist tag to opt in CDKv1 or CDKv2:\n\n// for CDKv2\nnpm install cdk-common\n```\n\n### AWS Managed Policies `enum`\n\n```python\nimport * as cdk from 'aws-cdk-lib';\nimport { AWSManagedPolicies } from 'cdk-common';\nimport { Construct } from 'constructs';\nconst app = new cdk.App();\n\nconst stack = new cdk.Stack(app, 'integ-default', { env });\n\nexport class IntegDefault extends Construct {\n  constructor(scope: Construct, id: string ) {\n    super(scope, id);\n\n    const role = new iam.Role(this, 'iamrole', {\n      assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),\n    });\n    // Use this way.\n    role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName(AWSManagedPolicies.AMAZON_SSM_MANAGED_INSTANCE_CORE));\n\n    // Not this way.\n    role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore'));\n  }\n}\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Common AWS CDK librarys.",
    "version": "2.0.1228",
    "project_urls": {
        "Homepage": "https://github.com/neilkuan/cdk-common.git",
        "Source": "https://github.com/neilkuan/cdk-common.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0cd074e11fb27fd04d2565ce916540162f7b381439e20db1607b61436ade3867",
                "md5": "45e841a40bf95dc2901b389203e2351c",
                "sha256": "fea89daa25aa12d767f0b5982483ac24cc83655ff9c06b7f8c3bd54d5330c86b"
            },
            "downloads": -1,
            "filename": "cdk_common-2.0.1228-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45e841a40bf95dc2901b389203e2351c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 3970261,
            "upload_time": "2025-07-10T00:21:02",
            "upload_time_iso_8601": "2025-07-10T00:21:02.896369Z",
            "url": "https://files.pythonhosted.org/packages/0c/d0/74e11fb27fd04d2565ce916540162f7b381439e20db1607b61436ade3867/cdk_common-2.0.1228-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e4452c3e10ecd36c06d1c834cba7f98a1f05266fdddab8aae91dfe10b707cdde",
                "md5": "d8a3dad07e8a5d9faea351797a3a16ec",
                "sha256": "e32727025963c45c5e360fd810e7092b44e11c55b0ee4e944ec91b92fe1509c3"
            },
            "downloads": -1,
            "filename": "cdk_common-2.0.1228.tar.gz",
            "has_sig": false,
            "md5_digest": "d8a3dad07e8a5d9faea351797a3a16ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 3972122,
            "upload_time": "2025-07-10T00:21:05",
            "upload_time_iso_8601": "2025-07-10T00:21:05.948269Z",
            "url": "https://files.pythonhosted.org/packages/e4/45/2c3e10ecd36c06d1c834cba7f98a1f05266fdddab8aae91dfe10b707cdde/cdk_common-2.0.1228.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 00:21:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neilkuan",
    "github_project": "cdk-common",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cdk-common"
}
        
Elapsed time: 1.08050s