Skip to content

docs: Add Web to tool name in docs #521

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
Oct 10, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions docs/design.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## How does it work?

AWS Lambda Adapter supports AWS Lambda function triggered by Amazon API Gateway Rest API, Http API(v2 event format), and Application Load Balancer.
Lambda Adapter converts incoming events to http requests and send to web application, and convert the http response back to lambda event response.
AWS Lambda Web Adapter supports AWS Lambda functions triggered by Amazon API Gateway Rest API, Http API (v2 event format), and Application Load Balancer.
Lambda Web Adapter converts incoming events to http requests and sends to web application, and converts the http response back to lambda event response.

Lambda Adapter is a Lambda Extension (since 0.2.0). When the docker image is running inside AWS Lambda Service, Lambda will automatic start the Adapter and
the runtime process. When running outside of Lambda, Lambda Adapter does not run at all. This allows developers to package their web application
Lambda Web Adapter is a Lambda Extension (since 0.2.0). When the docker image is running inside AWS Lambda Service, Lambda will automatic start the Adapter and
the runtime process. When running outside of Lambda, Lambda Web Adapter does not run at all. This allows developers to package their web application
as a container image and run it on AWS Lambda, AWS Fargate and Amazon EC2 without changing code.

After Lambda Adapter launch the application, it will perform readiness check on http://localhost:8080/ every 10ms.
After Lambda Web Adapter launches the application, it will perform readiness check on http://localhost:8080/ every 10ms.
It will start lambda runtime client after receiving 200 response from the application and forward requests to http://localhost:8080.

![lambda-runtime](images/lambda-adapter-runtime.png)
14 changes: 7 additions & 7 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## How to build it?

AWS Lambda Adapter is written in Rust and based on [AWS Lambda Rust Runtime](https://github.com/awslabs/aws-lambda-rust-runtime).
AWS Lambda Web Adapter is written in Rust and based on [AWS Lambda Rust Runtime](https://github.com/awslabs/aws-lambda-rust-runtime).
AWS Lambda executes functions in x86_64 Amazon Linux Environment. We need to compile the adapter to that environment.

### Clone the repo
Expand All @@ -13,7 +13,7 @@ $ cd aws-lambda-adapter
```

### Compiling with Docker
On x86_64 Windows, Linux and macOS, you can run one command to compile Lambda Adapter with docker.
On x86_64 Windows, Linux and macOS, you can run one command to compile Lambda Web Adapter with docker.
The Dockerfile is [here](../Dockerfile). [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) should have been installed and configured.

```shell
Expand All @@ -24,7 +24,7 @@ Once the build completes, it creates two docker images:
- "aws-lambda-adapter:latest-x86_64" for x86_64.
- "aws-lambda-adapter:latest-aarch64" for arm64.

AWS Lambda Adapter binary is packaged as '/opt/bootstrap' inside each docker image. "aws-lambda-adapter:latest" is tagged to the same image as "aws-lambda-adapter:latest-x86_64".
AWS Lambda Web Adapter binary is packaged as '/opt/bootstrap' inside each docker image. "aws-lambda-adapter:latest" is tagged to the same image as "aws-lambda-adapter:latest-x86_64".

### Compiling on macOS

Expand Down Expand Up @@ -56,15 +56,15 @@ linker = "x86_64-unknown-linux-musl-gcc"
linker = "aarch64-unknown-linux-musl-gcc"'> .cargo/config
```

Now we can cross compile AWS Lambda Adapter.
Now we can cross compile AWS Lambda Web Adapter.

```shell
$ CC=x86_64-unknown-linux-musl-gcc cargo build --release --target=x86_64-unknown-linux-musl --features vendored
$ CC=aarch64-unknown-linux-musl-gcc cargo build --release --target=aarch64-unknown-linux-musl --features vendored
```

Lambda Adapter binary for x86_64 will be placed at `target/x86_64-unknown-linux-musl/release/bootstrap`.
Lambda Adapter binary for arm64 will be placed at `target/aarch64-unknown-linux-musl/release/bootstrap`.
Lambda Web Adapter binary for x86_64 will be placed at `target/x86_64-unknown-linux-musl/release/bootstrap`.
Lambda Web Adapter binary for arm64 will be placed at `target/aarch64-unknown-linux-musl/release/bootstrap`.

Finally, run the following command to package lambda adapter into two container images for x86_64 and aarch64.

Expand All @@ -86,4 +86,4 @@ When these commands complete successfully, you will have the following container
Please test with the following [commands](https://github.com/awslabs/aws-lambda-web-adapter/blob/ff2dc8bddd968e74d7dc2ec56a249c56e5a3c5a7/.github/workflows/pipeline.yaml#L46-L49) before submitting a pull request:
1. `cargo fmt -- --check`
1. `cargo clippy -- -Dwarnings`
1. `cargo nextest run`
1. `cargo nextest run`
Loading