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

Commit 8c7a21b

Browse files
author
Alex
authored
chore: fix workflow trigger (#4)
Fix the workflow trigger.
1 parent f6cc620 commit 8c7a21b

File tree

9 files changed

+11
-10
lines changed

9 files changed

+11
-10
lines changed

.github/workflows/workflows/build.yml renamed to .github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: build
22
on:
33
pull_request: {}
4-
workflow_dispatch:
4+
workflow_dispatch: {}
55
jobs:
66
build:
77
runs-on: ubuntu-latest
File renamed without changes.

.jsii

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,7 +2854,7 @@
28542854
"stability": "stable"
28552855
},
28562856
"homepage": "https://github.com/amelnyk/cdk-lambda-powertools-python-layer.git",
2857-
"jsiiVersion": "1.47.0 (build 86d2c33)",
2857+
"jsiiVersion": "1.52.0 (build d7c9e27)",
28582858
"keywords": [
28592859
"aws",
28602860
"cdk",
@@ -2870,11 +2870,12 @@
28702870
"pacmak": {
28712871
"hasDefaultInterfaces": true
28722872
}
2873-
}
2873+
},
2874+
"tscRootDir": "src"
28742875
},
28752876
"name": "cdk-lambda-powertools-python-layer",
28762877
"readme": {
2877-
"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"
2878+
"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"
28782879
},
28792880
"repository": {
28802881
"type": "git",
@@ -3028,5 +3029,5 @@
30283029
}
30293030
},
30303031
"version": "0.0.0",
3031-
"fingerprint": "d0Vv2mqbhdMR/bcmrWttHIiURebjXsLVUdEv5TudkjE="
3032+
"fingerprint": "yi+OPgpzqxFOD5bLwt3fMMOHfi2Rs2/uE1SPJT3c56Y="
30323033
}

.projen/tasks.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yarn.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)