-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c97832
commit de67b78
Showing
2 changed files
with
50 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Lambda Layers with Terraform | ||
|
||
Simple demo application illustrating Lambda layers using LocalStack, deployed via Terraform. | ||
|
||
## Prerequisites | ||
|
||
* LocalStack | ||
* Docker | ||
* Terraform & `tflocal` | ||
* Python & `pip` | ||
* `make` | ||
|
||
## Installing | ||
|
||
To install the dependencies: | ||
``` | ||
make install | ||
``` | ||
|
||
## Running | ||
|
||
Make sure that LocalStack is started: | ||
|
||
``` | ||
LOCALSTACK_AUTH_TOKEN=... DEBUG=1 localstack start | ||
``` | ||
|
||
Deploy the app locally and run a Lambda test invocation: | ||
|
||
``` | ||
make run | ||
``` | ||
|
||
You should see a success output in the terminal: | ||
``` | ||
{"status": "success"} | ||
``` | ||
|
||
... and your LocalStack container should contain output similar to this: | ||
|
||
``` | ||
2024-05-17T15:46:22.870 DEBUG --- [et.reactor-1] l.s.l.i.version_manager : [my-lambda-function-52785b61-d14d-4871-8074-d5ab5fc49bb1] REPORT RequestId: 52785b61-d14d-4871-8074-d5ab5fc49bb1 Duration: 20.65 ms Billed Duration: 21 ms Memory Size: 128 MBMax Memory Used: 128 MB | ||
2024-05-17T15:46:22.872 DEBUG --- [et.reactor-1] l.s.lambda_.provider : Lambda invocation duration: 2230.03ms | ||
2024-05-17T15:46:22.874 INFO --- [et.reactor-1] localstack.request.aws : AWS lambda.Invoke => 200 | ||
``` | ||
|
||
## License | ||
|
||
This code is available under the Apache 2.0 license. |