Skip to content

Update project name in README file #37

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
merged 1 commit into from
Jul 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# AWS Lambda Adapter
# AWS Lambda Web Adapter

A tool to run web applications on AWS Lambda

AWS Lambda Adapter allows you to build web app (http api) with familiar frameworks (e.g. Express.js, Flask, SpringBoot, and Laravel, anything speaks HTTP 1.1/1.0) and run it on AWS Lambda.
The exact same docker image can run on AWS Lambda, Amazon EC2, AWS Fargate, and local computers.
AWS Lambda Web Adapter allows developers to build web app (http api) with familiar frameworks (e.g. Express.js, Flask, SpringBoot, and Laravel, anything speaks HTTP 1.1/1.0) and run it on AWS Lambda.
The same docker image can run on AWS Lambda, Amazon EC2, AWS Fargate, and local computers.

AWS Lambda adapter is developed as a Lambda extension (since v0.2.0). For details, checkout its [design](docs/design.md) and [development](docs/development.md) documents.
AWS Lambda Web Adapter is developed as a Lambda extension (since v0.2.0). For details, checkout its [design](docs/design.md) and [development](docs/development.md) documents.

![Lambda Adapter](docs/images/lambda-adapter-overview.png)
![Lambda Web Adapter](docs/images/lambda-adapter-overview.png)

## Usage

AWS Lambda Adapter work with Lambda functions packaged as both docker images and Zip packages.
AWS Lambda Web Adapter work with Lambda functions packaged as both docker images and Zip packages.

### Lambda functions packaged as Docker Images or OCI Images

To use Lambda Adapter with docker images, package your web app (http api) in a Dockerfile, and add one line to copy Lambda Adapter binary to /opt/extensions inside your container.
By default, Lambda Adapter assumes the web app is listening on port 8080. If not, you can specify the port via [configuration](#Configurations).
To use Lambda Web Adapter with docker images, package your web app (http api) in a Dockerfile, and add one line to copy Lambda Web Adapter binary to /opt/extensions inside your container.
By default, Lambda Web Adapter assumes the web app is listening on port 8080. If not, you can specify the port via [configuration](#Configurations).

```dockerfile
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.3.2 /lambda-adapter /opt/extensions/lambda-adapter
```

Pre-compiled Lambda Adapter binaries are provided in ECR public repo: [public.ecr.aws/awsguru/aws-lambda-adapter](https://gallery.ecr.aws/awsguru/aws-lambda-adapter).
Pre-compiled Lambda Web Adapter binaries are provided in ECR public repo: [public.ecr.aws/awsguru/aws-lambda-adapter](https://gallery.ecr.aws/awsguru/aws-lambda-adapter).
Multi-arch images are also provided in this repo. It works on both x86_64 and arm64 CPU architecture.

Below is a Dockerfile for [an example nodejs application](examples/expressjs).
Expand All @@ -43,9 +43,9 @@ This works with any base images except AWS managed base images. To use AWS manag

### Lambda functions packaged as Zip package for AWS managed runtimes

AWS Lambda Adapter also works with AWS managed Lambda runtimes. You need to do three things:
AWS Lambda Web Adapter also works with AWS managed Lambda runtimes. You need to do three things:

1. attach Lambda Adapter layer to your function.
1. attach Lambda Web Adapter layer to your function.
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:2`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:2`
2. configure Lambda environment variable `AWS_LAMBDA_EXEC_WRAPPER` to `/opt/bootstrap`.
Expand Down Expand Up @@ -76,6 +76,7 @@ Use REMOVE_BASE_PATH to remove the /orders prefix when routing requests to the a
- [Express.js](examples/expressjs)
- [Express.js in Zip](examples/expressjs-zip)
- [SpringBoot](examples/springboot)
- [SpringBoot in Zip](examples/springboot-zip)
- [nginx](examples/nginx)
- [php](examples/php)

Expand Down