[![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/ac/b3/333260c0f7bca8d29da1ff822e5b80fc1b0b28ca1968e78fd8ce55d61332/cdk_common-2.0.978.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.978",
"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": "2a76a14311e003d40551433fe3a301d0b7d252b1d9a2476fb85a335186643ae6",
"md5": "1a301e4546ed7f87ed09e112a0f19989",
"sha256": "0bc4457270aa8b445ad4941232d544411e26ad8e7789f4879e82672cb992a7ad"
},
"downloads": -1,
"filename": "cdk_common-2.0.978-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1a301e4546ed7f87ed09e112a0f19989",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 3860577,
"upload_time": "2024-10-09T00:16:00",
"upload_time_iso_8601": "2024-10-09T00:16:00.395643Z",
"url": "https://files.pythonhosted.org/packages/2a/76/a14311e003d40551433fe3a301d0b7d252b1d9a2476fb85a335186643ae6/cdk_common-2.0.978-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "acb3333260c0f7bca8d29da1ff822e5b80fc1b0b28ca1968e78fd8ce55d61332",
"md5": "72c81da0aceffd02c9f1f1e3d8011ee5",
"sha256": "283b564dffe04ee553bb09bf82311bdcf2833141a9fced97567f671124c3dc52"
},
"downloads": -1,
"filename": "cdk_common-2.0.978.tar.gz",
"has_sig": false,
"md5_digest": "72c81da0aceffd02c9f1f1e3d8011ee5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 3862308,
"upload_time": "2024-10-09T00:16:05",
"upload_time_iso_8601": "2024-10-09T00:16:05.066113Z",
"url": "https://files.pythonhosted.org/packages/ac/b3/333260c0f7bca8d29da1ff822e5b80fc1b0b28ca1968e78fd8ce55d61332/cdk_common-2.0.978.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-09 00:16: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"
}