cdk-common


Namecdk-common JSON
Version 2.0.192 PyPI version JSON
download
home_pagehttps://github.com/neilkuan/cdk-common.git
SummaryCommon AWS CDK librarys.
upload_time2022-07-03 00:24:12
maintainer
docs_urlNone
authorNeil Kuan<guan840912@gmail.com>
requires_python~=3.7
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
or
npm install cdk-common@latest

// for CDKv1
npm install cdk-common@cdkv1
```

💡💡💡 please click [here](https://github.com/neilkuan/cdk-common/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.💡💡💡

### 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": "",
    "docs_url": null,
    "requires_python": "~=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Neil Kuan<guan840912@gmail.com>",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/db/45/bdbe24c83847bca028cf162b39b098e912aae11870ad510e3c6d9c186314/cdk-common-2.0.192.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\nor\nnpm install cdk-common@latest\n\n// for CDKv1\nnpm install cdk-common@cdkv1\n```\n\n\ud83d\udca1\ud83d\udca1\ud83d\udca1 please click [here](https://github.com/neilkuan/cdk-common/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.\ud83d\udca1\ud83d\udca1\ud83d\udca1\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\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Common AWS CDK librarys.",
    "version": "2.0.192",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "eaf82f402a0389e098f4bb6125afac7c",
                "sha256": "9d2bdb4538328c5c97c1c92d8ffa4c4823516081085a8a89c3a73da943a919f9"
            },
            "downloads": -1,
            "filename": "cdk_common-2.0.192-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eaf82f402a0389e098f4bb6125afac7c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.7",
            "size": 3556577,
            "upload_time": "2022-07-03T00:24:09",
            "upload_time_iso_8601": "2022-07-03T00:24:09.160244Z",
            "url": "https://files.pythonhosted.org/packages/76/00/6eeadf988b85f7eb801ec20a54551ee04aa109d232bbccaf8714a7ed553e/cdk_common-2.0.192-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "87f7312f3a067783dbb1daf9ff04cbd8",
                "sha256": "e6c3d51c76df5398e0a707aade630a07bff7f1289d9cf5a53d15684446178df7"
            },
            "downloads": -1,
            "filename": "cdk-common-2.0.192.tar.gz",
            "has_sig": false,
            "md5_digest": "87f7312f3a067783dbb1daf9ff04cbd8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.7",
            "size": 3557934,
            "upload_time": "2022-07-03T00:24:12",
            "upload_time_iso_8601": "2022-07-03T00:24:12.151922Z",
            "url": "https://files.pythonhosted.org/packages/db/45/bdbe24c83847bca028cf162b39b098e912aae11870ad510e3c6d9c186314/cdk-common-2.0.192.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-03 00:24:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "neilkuan",
    "github_project": "cdk-common.git",
    "lcname": "cdk-common"
}
        
Elapsed time: 0.45121s