Skip to content

Commit

Permalink
docs: bump the version to v0.8.4 (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marukome0743 authored Jul 29, 2024
1 parent 9c268fa commit 5d7885b
Show file tree
Hide file tree
Showing 57 changed files with 77 additions and 77 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AWS Lambda Web Adapter work with Lambda functions packaged as both docker images
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:

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

[Non-AWS base images](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html) may be used since the [Runtime Interface Client](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-ric) ships with the Lambda Web Adapter.
Expand All @@ -42,7 +42,7 @@ Below is a Dockerfile for [an example nodejs application](examples/expressjs).

```dockerfile
FROM public.ecr.aws/docker/library/node:20-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=7000
WORKDIR "/var/task"
ADD src/package.json /var/task/package.json
Expand All @@ -61,15 +61,15 @@ AWS Lambda Web Adapter also works with AWS managed Lambda runtimes. You need to
1. attach Lambda Web Adapter layer to your function.
#### AWS Commercial Regions

1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22`
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23`

#### AWS China Regions

1. cn-north-1 (Beijing)
- x86_64: `arn:aws-cn:lambda:cn-north-1:041581134020:layer:LambdaAdapterLayerX86:22`
- x86_64: `arn:aws-cn:lambda:cn-north-1:041581134020:layer:LambdaAdapterLayerX86:23`
2. cn-northwest-1 (Ningxia)
- x86_64: `arn:aws-cn:lambda:cn-northwest-1:069767869989:layer:LambdaAdapterLayerX86:22`
- x86_64: `arn:aws-cn:lambda:cn-northwest-1:069767869989:layer:LambdaAdapterLayerX86:23`

2. configure Lambda environment variable `AWS_LAMBDA_EXEC_WRAPPER` to `/opt/bootstrap`.
3. set function handler to your web application start up script. e.g. `run.sh`.
Expand Down
2 changes: 1 addition & 1 deletion examples/aspnet-mvc-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
RUST_LOG: info
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
Api:
Type: HttpApi
Expand Down
2 changes: 1 addition & 1 deletion examples/aspnet-mvc-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
RUST_LOG: info
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
Api:
Type: HttpApi
Expand Down
4 changes: 2 additions & 2 deletions examples/aspnet-mvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN dotnet publish "AspNetLambdaWebAdapter.csproj" -c Release -o /app/publish

FROM base AS final
ENV ASPNETCORE_URLS=http://+:8080
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AspNetLambdaWebAdapter.dll"]
Expand All @@ -32,7 +32,7 @@ ENTRYPOINT ["dotnet", "AspNetLambdaWebAdapter.dll"]
Line 12 copies lambda adapter binary into /opt/extenions. This is required to run ASP.NET application on Lambda. The `ASPNETCORE_URLS` environment variable is also set to 8080. This is required for the Lambda Web Adapter to work.

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

## Pre-requisites
Expand Down
2 changes: 1 addition & 1 deletion examples/aspnet-mvc/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN dotnet publish "AspNetLambdaWebAdapter.csproj" -c Release -o /app/publish

FROM base AS final
ENV ASPNETCORE_URLS=http://+:<port>
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AspNetLambdaWebAdapter.dll"]
2 changes: 1 addition & 1 deletion examples/aspnet-webapi-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
RUST_LOG: info
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
Api:
Type: HttpApi
Expand Down
2 changes: 1 addition & 1 deletion examples/aspnet-webapi-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
RUST_LOG: info
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
Api:
Type: HttpApi
Expand Down
2 changes: 1 addition & 1 deletion examples/bedrock-agent-fastapi-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Resources:
AWS_LWA_READINESS_CHECK_PROTOCOL: TCP
PORT: 8000
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Policies: AmazonS3ReadOnlyAccess

BedrockAgentPermission:
Expand Down
4 changes: 2 additions & 2 deletions examples/bedrock-agent-fastapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The top level folder is a typical AWS SAM project. The `app` directory is an Fas

```dockerfile
FROM public.ecr.aws/docker/library/python:3.12.0-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8000 AWS_LWA_READINESS_CHECK_PROTOCOL=tcp
WORKDIR /var/task
COPY requirements.txt ./
Expand All @@ -20,7 +20,7 @@ CMD exec uvicorn --port=$PORT main:app
Line 2 copies lambda adapter binary into /opt/extenions. This is the only change to run the FastAPI application on Lambda.

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

## Pre-requisites
Expand Down
2 changes: 1 addition & 1 deletion examples/bedrock-agent-fastapi/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM public.ecr.aws/docker/library/python:3.12.0-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8000 AWS_LWA_READINESS_CHECK_PROTOCOL=tcp
WORKDIR /var/task
COPY requirements.txt ./
Expand Down
2 changes: 1 addition & 1 deletion examples/deno-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We use `java11` runtime to get SnapStart support with one caveat: no runtime hoo
Architectures:
- x86_64
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
MemorySize: 512
Environment:
Variables:
Expand Down
2 changes: 1 addition & 1 deletion examples/deno-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Resources:
Architectures:
- x86_64
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
MemorySize: 512
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
Expand Down
4 changes: 2 additions & 2 deletions examples/expressjs-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This example shows how to use Lambda Adapter to run an express.js application on
We add Lambda Adapter layer to the function and configure wrapper script.

1. attach Lambda Adapter layer to your function. This layer containers Lambda Adapter binary and a wrapper script.
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22`
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23`
2. configure Lambda environment variable `AWS_LAMBDA_EXEC_WRAPPER` to `/opt/bootstrap`. This is a wrapper script included in the layer.
3. set function handler to a startup command: `run.sh`. The wrapper script will execute this command to boot up your application.

Expand Down
2 changes: 1 addition & 1 deletion examples/expressjs-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
RUST_LOG: info
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
RootPath:
Type: Api
Expand Down
4 changes: 2 additions & 2 deletions examples/expressjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The top level folder is a typical AWS SAM project. The `app` directory is an exp

```dockerfile
FROM public.ecr.aws/docker/library/node:16.13.2-stretch-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
EXPOSE 8080
WORKDIR "/var/task"
ADD src/package.json /var/task/package.json
Expand All @@ -23,7 +23,7 @@ CMD ["node", "index.js"]
Line 2 copies lambda adapter binary into /opt/extenions. This is the only change to run the express.js application on Lambda.

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

## Pre-requisites
Expand Down
2 changes: 1 addition & 1 deletion examples/expressjs/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM public.ecr.aws/docker/library/node:16.13.2-stretch-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
EXPOSE 8080
WORKDIR "/var/task"
ADD src/package.json /var/task/package.json
Expand Down
4 changes: 2 additions & 2 deletions examples/fastapi-background-tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The top level folder is a typical AWS SAM project. The `app` directory is a Fast

```dockerfile
FROM public.ecr.aws/docker/library/python:3.12-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8000
WORKDIR /var/task
COPY requirements.txt ./
Expand All @@ -22,7 +22,7 @@ CMD exec uvicorn --port=$PORT main:app
Line 2 copies lambda web adapter binary into /opt/extensions. This is the change to run the FastAPI application on Lambda.

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

## Pre-requisites
Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi-background-tasks/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM public.ecr.aws/docker/library/python:3.12-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8000
WORKDIR /var/task
COPY requirements.txt ./
Expand Down
6 changes: 3 additions & 3 deletions examples/fastapi-response-streaming-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This example shows how to use Lambda Web Adapter to run a FastAPI application wi
We add Lambda Web Adapter layer to the function and configure wrapper script.

1. attach Lambda Adapter layer to your function. This layer containers Lambda Adapter binary and a wrapper script.
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22`
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23`
2. configure Lambda environment variable `AWS_LAMBDA_EXEC_WRAPPER` to `/opt/bootstrap`. This is a wrapper script included in the layer.
3. set function handler to a startup command: `run.sh`. The wrapper script will execute this command to boot up your application.

Expand All @@ -30,7 +30,7 @@ This is the resource for Lambda function. The function urls's invoke mode is con
AWS_LWA_INVOKE_MODE: response_stream
PORT: 8000
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
FunctionUrlConfig:
AuthType: NONE
InvokeMode: RESPONSE_STREAM
Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi-response-streaming-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Resources:
AWS_LWA_INVOKE_MODE: response_stream
PORT: 8000
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
FunctionUrlConfig:
AuthType: NONE
InvokeMode: RESPONSE_STREAM
Expand Down
4 changes: 2 additions & 2 deletions examples/fastapi-response-streaming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This function is packaged as a Docker image. Here is the content of the Dockerfi

```dockerfile
FROM public.ecr.aws/docker/library/python:3.12.0-slim-bullseye
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter

WORKDIR /app
ADD . .
Expand All @@ -26,7 +26,7 @@ CMD ["python", "main.py"]
Notice that we only need to add the second line to install Lambda Web Adapter.

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

In the SAM template, we use an environment variable `AWS_LWA_INVOKE_MODE: RESPONSE_STREAM` to configure Lambda Web Adapter in response streaming mode. And adding a function url with `InvokeMode: RESPONSE_STREAM`.
Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi-response-streaming/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM public.ecr.aws/docker/library/python:3.12.0-slim-bullseye
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter

WORKDIR /app
ADD . .
Expand Down
4 changes: 2 additions & 2 deletions examples/fastapi-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This example shows how to use Lambda Web Adapter to run a FastAPI application on
We add Lambda Web Adapter layer to the function and configure wrapper script.

1. attach Lambda Adapter layer to your function. This layer containers Lambda Adapter binary and a wrapper script.
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22`
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23`
2. configure Lambda environment variable `AWS_LAMBDA_EXEC_WRAPPER` to `/opt/bootstrap`. This is a wrapper script included in the layer.
3. set function handler to a startup command: `run.sh`. The wrapper script will execute this command to boot up your application.

Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
PORT: 8000
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
ApiEvent:
Type: HttpApi
Expand Down
4 changes: 2 additions & 2 deletions examples/fastapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The top level folder is a typical AWS SAM project. The `app` directory is a Fast

```dockerfile
FROM public.ecr.aws/docker/library/python:3.8.12-slim-buster
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8000
WORKDIR /var/task
COPY requirements.txt ./
Expand All @@ -22,7 +22,7 @@ CMD exec uvicorn --port=$PORT main:app
Line 2 copies lambda web adapter binary into /opt/extensions. This is the change to run the FastAPI application on Lambda.

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

## Pre-requisites
Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM public.ecr.aws/docker/library/python:3.12-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8000
WORKDIR /var/task
COPY requirements.txt ./
Expand Down
4 changes: 2 additions & 2 deletions examples/flask-zip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This example shows how to use Lambda Adapter to run an Flask application on mana
We add Lambda Adapter layer to the function and configure wrapper script.

1. attach Lambda Adapter layer to your function. This layer containers Lambda Adapter binary and a wrapper script.
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22`
1. x86_64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23`
2. arm64: `arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23`
2. configure Lambda environment variable `AWS_LAMBDA_EXEC_WRAPPER` to `/opt/bootstrap`. This is a wrapper script included in the layer.
3. set function handler to a startup command: `run.sh`. The wrapper script will execute this command to boot up your application.

Expand Down
2 changes: 1 addition & 1 deletion examples/flask-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Resources:
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
PORT: 8000
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
ApiEvent:
Type: HttpApi
Expand Down
4 changes: 2 additions & 2 deletions examples/flask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The top level folder is a typical AWS SAM project. The `app` directory is a flas

```dockerfile
FROM public.ecr.aws/docker/library/python:3.8.12-slim-buster
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
WORKDIR /var/task
COPY app.py requirements.txt ./
RUN python3.8 -m pip install -r requirements.txt
Expand All @@ -20,7 +20,7 @@ CMD ["gunicorn", "-b=:8080", "-w=1", "app:app"]
Line 2 copies lambda adapter binary into /opt/extensions. This is the only change to run the Flask application on Lambda.

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

## Pre-requisites
Expand Down
2 changes: 1 addition & 1 deletion examples/flask/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM public.ecr.aws/docker/library/python:3.12.1-slim
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
WORKDIR /var/task
COPY app.py requirements.txt ./
RUN python -m pip install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion examples/gin-zip/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Resources:
PORT: 8000
GIN_MODE: release
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
APIEvent:
Type: HttpApi
Expand Down
Loading

0 comments on commit 5d7885b

Please sign in to comment.