-
Notifications
You must be signed in to change notification settings - Fork 420
feat: add workflow to trigger external pipeline for publishing lambda layers #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
heitorlessa
merged 14 commits into
aws-powertools:develop
from
am29d:feat/lambda-layers
Aug 25, 2020
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1f43ce4
line endings
eea4375
fix indent, yaml ...
1949593
fix typo in branch trigger
6ddd736
more typos
e6e5c12
add relase tag simulation
dac548c
add overwrite flag for ssm
7e0b872
remove tmp release flag and set trigger to release published
e8d77b7
change to eu-west-1 default region
2455001
moved publish step to publish workflow after pypi push
ac10b4f
add layer to docs and how to use it from SAR
5a9d576
Merge branch 'develop' into feat/lambda-layers
am29d 679b22f
formatting for bash script
09d841e
Merge branch 'feat/lambda-layers' of github.com:am29d/aws-lambda-powe…
607904c
fix heading error due to merge
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -58,6 +58,22 @@ from aws_lambda_powertools.logging.logger import set_package_logger | |||||||||||||||||||||||||||||||||||||||||||||||||||
set_package_logger() | ||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
## Lambda Layer | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Powertools is also available as a layer and is distributed via the [Serverless Application Repository](https://docs.aws.amazon.com/serverlessrepo/latest/devguide/what-is-serverlessrepo.html). | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Create the layer via API with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
```bash:title=bash-script | ||||||||||||||||||||||||||||||||||||||||||||||||||||
aws serverlessrepo create-cloud-formation-change-set --application-id arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer --stack-name YOUR_STACK_NAME --capabilities CAPABILITY_NAMED_IAM | ||||||||||||||||||||||||||||||||||||||||||||||||||||
CHANGE_SET_ID=$(aws cloudformation list-change-sets --stack-name YOUR_STACK_NAME --query 'Summaries[*].ChangeSetId' --output text) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
aws cloudformation wait change-set-create-complete --change-set-name $CHANGE_SET_ID | ||||||||||||||||||||||||||||||||||||||||||||||||||||
aws cloudformation execute-change-set --change-set-name $CHANGE_SET_ID | ||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
this will create a CloudFormation stack with the powertools layer in a specific region where you run this commands. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Keep in mind that layers are regional resources and you need to create the layer in every region where you need it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Alternatively, you can deploy the layer from the AWS Console by navigating to Serverless Application Repository and search for `aws-lambda-powertools-python-layer` and follow the deploy steps from there. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+64
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Customers typically use SAR within their SAM stack, or the Console, but rarely using the CLI as it's quite a lot of steps. Added a table as well as a snippet of this SAR App |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
## Tenets | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
* **AWS Lambda only** – We optimise for AWS Lambda function environments and supported runtimes only. Utilities might work with web frameworks and non-Lambda environments, though they are not officially supported. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.