cdk-common


Namecdk-common JSON
Version 2.0.818 PyPI version JSON
download
home_pagehttps://github.com/neilkuan/cdk-common.git
SummaryCommon AWS CDK librarys.
upload_time2024-04-20 00:13:22
maintainerNone
docs_urlNone
authorNeil Kuan<guan840912@gmail.com>
requires_python~=3.8
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": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Neil Kuan<guan840912@gmail.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/45/39/32788983bdb1a4bbbc054f0fb55a2f789e5001612532fc69a05e93d085dd/cdk-common-2.0.818.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",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Common AWS CDK librarys.",
    "version": "2.0.818",
    "project_urls": {
        "Homepage": "https://github.com/neilkuan/cdk-common.git",
        "Source": "https://github.com/neilkuan/cdk-common.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc98b2d6cf1b79f69c2a509902717f899576a2e071aeca095cbd8f22c1008050",
                "md5": "abe749605a11fc1c6a89446b1920407f",
                "sha256": "fc3916759e769c104b0a8e03f73f3d598c0ec5a24087ec76dc362a28c645af0b"
            },
            "downloads": -1,
            "filename": "cdk_common-2.0.818-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "abe749605a11fc1c6a89446b1920407f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 3579066,
            "upload_time": "2024-04-20T00:13:08",
            "upload_time_iso_8601": "2024-04-20T00:13:08.882876Z",
            "url": "https://files.pythonhosted.org/packages/bc/98/b2d6cf1b79f69c2a509902717f899576a2e071aeca095cbd8f22c1008050/cdk_common-2.0.818-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "453932788983bdb1a4bbbc054f0fb55a2f789e5001612532fc69a05e93d085dd",
                "md5": "02828b6358e7a2d8e77ee7a69be44627",
                "sha256": "3ba5a8604f27c2361d84a3d14374bf281e0da592b2dc6a7d4d2317dac0628840"
            },
            "downloads": -1,
            "filename": "cdk-common-2.0.818.tar.gz",
            "has_sig": false,
            "md5_digest": "02828b6358e7a2d8e77ee7a69be44627",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 3580650,
            "upload_time": "2024-04-20T00:13:22",
            "upload_time_iso_8601": "2024-04-20T00:13:22.220971Z",
            "url": "https://files.pythonhosted.org/packages/45/39/32788983bdb1a4bbbc054f0fb55a2f789e5001612532fc69a05e93d085dd/cdk-common-2.0.818.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-20 00:13:22",
    "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: 0.27420s