Skip to content

Commit

Permalink
add some basic docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshCasper committed May 17, 2024
1 parent 5c97832 commit de67b78
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lambda-layers/terraform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ invoke:
output.json
cat output.json

run: start install init deploy invoke
run: start install package init deploy invoke

clean:
rm -rf build
Expand Down
49 changes: 49 additions & 0 deletions lambda-layers/terraform/README.md
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.

0 comments on commit de67b78

Please sign in to comment.