Skip to content

Commit de67b78

Browse files
committed
add some basic docs
1 parent 5c97832 commit de67b78

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

lambda-layers/terraform/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ invoke:
4242
output.json
4343
cat output.json
4444

45-
run: start install init deploy invoke
45+
run: start install package init deploy invoke
4646

4747
clean:
4848
rm -rf build

lambda-layers/terraform/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Lambda Layers with Terraform
2+
3+
Simple demo application illustrating Lambda layers using LocalStack, deployed via Terraform.
4+
5+
## Prerequisites
6+
7+
* LocalStack
8+
* Docker
9+
* Terraform & `tflocal`
10+
* Python & `pip`
11+
* `make`
12+
13+
## Installing
14+
15+
To install the dependencies:
16+
```
17+
make install
18+
```
19+
20+
## Running
21+
22+
Make sure that LocalStack is started:
23+
24+
```
25+
LOCALSTACK_AUTH_TOKEN=... DEBUG=1 localstack start
26+
```
27+
28+
Deploy the app locally and run a Lambda test invocation:
29+
30+
```
31+
make run
32+
```
33+
34+
You should see a success output in the terminal:
35+
```
36+
{"status": "success"}
37+
```
38+
39+
... and your LocalStack container should contain output similar to this:
40+
41+
```
42+
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
43+
2024-05-17T15:46:22.872 DEBUG --- [et.reactor-1] l.s.lambda_.provider : Lambda invocation duration: 2230.03ms
44+
2024-05-17T15:46:22.874 INFO --- [et.reactor-1] localstack.request.aws : AWS lambda.Invoke => 200
45+
```
46+
47+
## License
48+
49+
This code is available under the Apache 2.0 license.

0 commit comments

Comments
 (0)