Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

chore: test workflow trigger #4

Merged
merged 3 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: build
on:
pull_request: {}
workflow_dispatch:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions .jsii
Original file line number Diff line number Diff line change
Expand Up @@ -2854,7 +2854,7 @@
"stability": "stable"
},
"homepage": "https://github.com/amelnyk/cdk-lambda-powertools-python-layer.git",
"jsiiVersion": "1.47.0 (build 86d2c33)",
"jsiiVersion": "1.52.0 (build d7c9e27)",
"keywords": [
"aws",
"cdk",
Expand All @@ -2870,11 +2870,12 @@
"pacmak": {
"hasDefaultInterfaces": true
}
}
},
"tscRootDir": "src"
},
"name": "cdk-lambda-powertools-python-layer",
"readme": {
"markdown": "# Lambda powertools python layer\n\n## Why this project exists\nThis is a custom construct that will create AWS Lambda Layer with AWS Powertools for Python library.\nThere are different ways how to create a layer and when working with CDK you need to install the library, create a zip file and wire it correctly.\nWith this construct you don't have to care about packaging and dependency management, just create a construct and add it to your function.\nThe construct is an extension of the existing [`LayerVersion`](https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-lambda.LayerVersion.html) construct from the CDK library, so you have access to all fields and methods.\n\n```typescript\nimport { LambdaPowertoolsLayer } from 'cdk-lambda-powertools-python-layer';\n\nconst powertoolsLayer = new LambdaPowertoolsLayer(this, 'TestLayer');\n```\n\n## How to test\n\nThis module is not published yet, therefore you need to install few tools to test it.\nThis section will be deleted after the construct is released to a public repository.\n\n### Requirements\n\n* cdk v2\n* docker\n* npm or yarn, whatever you prefer\n\n### Build construct\n\nAfter you have checked out the repo:\n\n```shell\nnpm i\nnpm run build\n```\n\nThis will create a tgz file in `dist/js` directory. You can copy this file to your test project then install this module\nwith\n\n```shell\nnpm i file:PATH_TO_PACKAGE/[email protected]\n```\n\n## Install\n\nTypeSript/JavaScript:\n\n```shell\nnpm i cdk-lambda-powertools-python-layer\n```\n\nPython:\n\n```shell\npip install cdk-lambda-powertools-python-layer\n```\n\n## Usage\n\nA single line will create a layer with powertools for python:\n\n```typescript\nimport { LambdaPowertoolsLayer } from 'cdk-lambda-powertools-python-layer';\n\nconst powertoolsLayer = new LambdaPowertoolsLayer(this, 'TestLayer', {\n version: '1.22.0',\n});\n```\n\nYou can then add the layer to your funciton:\n\n```typescript\nnew Function(this, 'LambdaFunction', {\n code: Code.fromAsset(path.join('./function')),\n handler: 'app.handler',\n runtime: Runtime.PYTHON_3_9,\n layers: [powertoolsLayer],\n});\n```\n\nYou can specify the powertools version by passing the optional `version` paramter, otherwise the construct will take the latest\nversion from pypi repository.\n\n```typescript\nnew LambdaPowertoolsLayer(this, 'PowertoolsLayer', {\n version: '1.21.0'\n});\n```\n\nAdditionally, powertools have extras depenedncies such as Pydantic, [documented here](https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer).\nThis is not included by default, and you have to set this option in the construct definition if you need it:\n\n```typescript\nnew LambdaPowertoolsLayer(this, 'PowertoolsLayer', {\n includeExtras: true\n});\n```\n\nFull example:\n\n```typescript\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\nimport { LambdaPowertoolsLayer } from 'cdk-lambda-powertools-python-layer';\nimport { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as path from 'path';\n\nexport class CdkPowertoolsExampleStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n\n const powertoolsLayer = new LambdaPowertoolsLayer(this, 'TestLayer', {\n version: '1.22.0',\n includeExtras: true\n });\n\n new Function(this, 'LambdaFunction', {\n code: Code.fromAsset(path.join('./function')),\n handler: 'app.handler',\n runtime: Runtime.PYTHON_3_9,\n layers: [powertoolsLayer],\n });\n }\n}\n\n```\n"
"markdown": "# Lambda powertools python layer\n\n## Why this project exists\nThis is a custom construct that will create AWS Lambda Layer with AWS Powertools for Python library.\nThere are different ways how to create a layer and when working with CDK you need to install the library, create a zip file and wire it correctly.\nWith this construct you don't have to care about packaging and dependency management, just create a construct and add it to your function.\nThe construct is an extension of the existing [`LayerVersion`](https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-lambda.LayerVersion.html) construct from the CDK library, so you have access to all fields and methods.\n\n```typescript\nimport { LambdaPowertoolsLayer } from 'cdk-lambda-powertools-python-layer';\n\nconst powertoolsLayer = new LambdaPowertoolsLayer(this, 'TestLayer');\n```\n\n\n## Install\n\nTypeSript/JavaScript:\n\n```shell\nnpm i cdk-lambda-powertools-python-layer\n```\n\nPython:\n\n```shell\npip install cdk-lambda-powertools-python-layer\n```\n\n## Usage\n\nA single line will create a layer with powertools for python:\n\n```typescript\nimport { LambdaPowertoolsLayer } from 'cdk-lambda-powertools-python-layer';\n\nconst powertoolsLayer = new LambdaPowertoolsLayer(this, 'TestLayer', {\n version: '1.22.0',\n});\n```\n\nYou can then add the layer to your funciton:\n\n```typescript\nnew Function(this, 'LambdaFunction', {\n code: Code.fromAsset(path.join('./function')),\n handler: 'app.handler',\n runtime: Runtime.PYTHON_3_9,\n layers: [powertoolsLayer],\n});\n```\n\nYou can specify the powertools version by passing the optional `version` paramter, otherwise the construct will take the latest\nversion from pypi repository.\n\n```typescript\nnew LambdaPowertoolsLayer(this, 'PowertoolsLayer', {\n version: '1.21.0'\n});\n```\n\nAdditionally, powertools have extras depenedncies such as Pydantic, [documented here](https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer).\nThis is not included by default, and you have to set this option in the construct definition if you need it:\n\n```typescript\nnew LambdaPowertoolsLayer(this, 'PowertoolsLayer', {\n includeExtras: true\n});\n```\n\nFull example:\n\n```typescript\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\nimport { LambdaPowertoolsLayer } from 'cdk-lambda-powertools-python-layer';\nimport { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as path from 'path';\n\nexport class CdkPowertoolsExampleStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n\n const powertoolsLayer = new LambdaPowertoolsLayer(this, 'TestLayer', {\n version: '1.22.0',\n includeExtras: true\n });\n\n new Function(this, 'LambdaFunction', {\n code: Code.fromAsset(path.join('./function')),\n handler: 'app.handler',\n runtime: Runtime.PYTHON_3_9,\n layers: [powertoolsLayer],\n });\n }\n}\n\n```\n"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -3028,5 +3029,5 @@
}
},
"version": "0.0.0",
"fingerprint": "d0Vv2mqbhdMR/bcmrWttHIiURebjXsLVUdEv5TudkjE="
"fingerprint": "yi+OPgpzqxFOD5bLwt3fMMOHfi2Rs2/uE1SPJT3c56Y="
}
3 changes: 2 additions & 1 deletion .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.