From 5d7885bd26b3b838e0884865f301ab01e14d8960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AB=E3=82=B3=E3=83=A1?= Date: Mon, 29 Jul 2024 11:20:06 +0900 Subject: [PATCH] docs: bump the version to v0.8.4 (#488) --- README.md | 12 ++++++------ examples/aspnet-mvc-zip/README.md | 2 +- examples/aspnet-mvc-zip/template.yaml | 2 +- examples/aspnet-mvc/README.md | 4 ++-- examples/aspnet-mvc/src/Dockerfile | 2 +- examples/aspnet-webapi-zip/README.md | 2 +- examples/aspnet-webapi-zip/template.yaml | 2 +- examples/bedrock-agent-fastapi-zip/template.yaml | 2 +- examples/bedrock-agent-fastapi/README.md | 4 ++-- examples/bedrock-agent-fastapi/app/Dockerfile | 2 +- examples/deno-zip/README.md | 2 +- examples/deno-zip/template.yaml | 2 +- examples/expressjs-zip/README.md | 4 ++-- examples/expressjs-zip/template.yaml | 2 +- examples/expressjs/README.md | 4 ++-- examples/expressjs/app/Dockerfile | 2 +- examples/fastapi-background-tasks/README.md | 4 ++-- examples/fastapi-background-tasks/app/Dockerfile | 2 +- examples/fastapi-response-streaming-zip/README.md | 6 +++--- .../fastapi-response-streaming-zip/template.yaml | 2 +- examples/fastapi-response-streaming/README.md | 4 ++-- examples/fastapi-response-streaming/app/Dockerfile | 2 +- examples/fastapi-zip/README.md | 4 ++-- examples/fastapi-zip/template.yaml | 2 +- examples/fastapi/README.md | 4 ++-- examples/fastapi/app/Dockerfile | 2 +- examples/flask-zip/README.md | 4 ++-- examples/flask-zip/template.yaml | 2 +- examples/flask/README.md | 4 ++-- examples/flask/app/Dockerfile | 2 +- examples/gin-zip/template.yaml | 2 +- examples/gin/app/Dockerfile | 2 +- examples/go-http-zip/template.yml | 2 +- examples/javalin-zip/README.md | 2 +- examples/javalin-zip/template.yaml | 2 +- examples/nextjs-response-streaming/Dockerfile | 2 +- examples/nextjs-zip/template.yaml | 2 +- examples/nextjs/app/Dockerfile | 2 +- examples/nginx-zip/template.yaml | 2 +- examples/nginx/Dockerfile | 2 +- examples/nginx/README.md | 4 ++-- examples/php-zip/template.yaml | 2 +- examples/php/Dockerfile | 2 +- examples/php/README.md | 2 +- examples/rust-actix-web-zip/template.yaml | 2 +- examples/rust-axum-zip/template.yaml | 2 +- examples/sinatra/README.md | 2 +- examples/sinatra/app/Dockerfile | 2 +- examples/sls/nestjs/Dockerfile | 2 +- examples/springboot-response-streaming-zip/README.md | 2 +- .../springboot-response-streaming-zip/template.yaml | 2 +- examples/springboot-zip/README.md | 2 +- examples/springboot-zip/template.yaml | 2 +- examples/springboot/README.md | 4 ++-- examples/springboot/app/Dockerfile | 2 +- examples/sqs-expressjs/README.md | 4 ++-- examples/sqs-expressjs/app/Dockerfile | 2 +- 57 files changed, 77 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 533ee192..f6ce21f0 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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`. diff --git a/examples/aspnet-mvc-zip/README.md b/examples/aspnet-mvc-zip/README.md index b0d162d4..ebc9b9b3 100644 --- a/examples/aspnet-mvc-zip/README.md +++ b/examples/aspnet-mvc-zip/README.md @@ -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 diff --git a/examples/aspnet-mvc-zip/template.yaml b/examples/aspnet-mvc-zip/template.yaml index 19481d12..f4e064d2 100644 --- a/examples/aspnet-mvc-zip/template.yaml +++ b/examples/aspnet-mvc-zip/template.yaml @@ -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 diff --git a/examples/aspnet-mvc/README.md b/examples/aspnet-mvc/README.md index f9766a4b..6a843899 100644 --- a/examples/aspnet-mvc/README.md +++ b/examples/aspnet-mvc/README.md @@ -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"] @@ -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 diff --git a/examples/aspnet-mvc/src/Dockerfile b/examples/aspnet-mvc/src/Dockerfile index 0d976de9..823bf4e5 100644 --- a/examples/aspnet-mvc/src/Dockerfile +++ b/examples/aspnet-mvc/src/Dockerfile @@ -12,7 +12,7 @@ RUN dotnet publish "AspNetLambdaWebAdapter.csproj" -c Release -o /app/publish FROM base AS final ENV ASPNETCORE_URLS=http://+: -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"] \ No newline at end of file diff --git a/examples/aspnet-webapi-zip/README.md b/examples/aspnet-webapi-zip/README.md index e7bddf4d..68ae9825 100644 --- a/examples/aspnet-webapi-zip/README.md +++ b/examples/aspnet-webapi-zip/README.md @@ -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 diff --git a/examples/aspnet-webapi-zip/template.yaml b/examples/aspnet-webapi-zip/template.yaml index 2bc7652d..1e98f8dc 100644 --- a/examples/aspnet-webapi-zip/template.yaml +++ b/examples/aspnet-webapi-zip/template.yaml @@ -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 diff --git a/examples/bedrock-agent-fastapi-zip/template.yaml b/examples/bedrock-agent-fastapi-zip/template.yaml index 8b915fd4..fd9e6ff7 100644 --- a/examples/bedrock-agent-fastapi-zip/template.yaml +++ b/examples/bedrock-agent-fastapi-zip/template.yaml @@ -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: diff --git a/examples/bedrock-agent-fastapi/README.md b/examples/bedrock-agent-fastapi/README.md index 12cdaaff..871585b0 100644 --- a/examples/bedrock-agent-fastapi/README.md +++ b/examples/bedrock-agent-fastapi/README.md @@ -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 ./ @@ -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 diff --git a/examples/bedrock-agent-fastapi/app/Dockerfile b/examples/bedrock-agent-fastapi/app/Dockerfile index 89d6fc2b..661f933d 100644 --- a/examples/bedrock-agent-fastapi/app/Dockerfile +++ b/examples/bedrock-agent-fastapi/app/Dockerfile @@ -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 ./ diff --git a/examples/deno-zip/README.md b/examples/deno-zip/README.md index d837f1fe..bf4e7a2b 100644 --- a/examples/deno-zip/README.md +++ b/examples/deno-zip/README.md @@ -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: diff --git a/examples/deno-zip/template.yaml b/examples/deno-zip/template.yaml index 3114395d..b0c8f708 100644 --- a/examples/deno-zip/template.yaml +++ b/examples/deno-zip/template.yaml @@ -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: diff --git a/examples/expressjs-zip/README.md b/examples/expressjs-zip/README.md index 5722d9e8..8d2bb713 100644 --- a/examples/expressjs-zip/README.md +++ b/examples/expressjs-zip/README.md @@ -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. diff --git a/examples/expressjs-zip/template.yaml b/examples/expressjs-zip/template.yaml index df98ab7f..65a22371 100644 --- a/examples/expressjs-zip/template.yaml +++ b/examples/expressjs-zip/template.yaml @@ -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 diff --git a/examples/expressjs/README.md b/examples/expressjs/README.md index 39f2686e..c07cb33a 100644 --- a/examples/expressjs/README.md +++ b/examples/expressjs/README.md @@ -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 @@ -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 diff --git a/examples/expressjs/app/Dockerfile b/examples/expressjs/app/Dockerfile index 26941e5c..62470367 100644 --- a/examples/expressjs/app/Dockerfile +++ b/examples/expressjs/app/Dockerfile @@ -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 diff --git a/examples/fastapi-background-tasks/README.md b/examples/fastapi-background-tasks/README.md index c34b441e..2552a967 100644 --- a/examples/fastapi-background-tasks/README.md +++ b/examples/fastapi-background-tasks/README.md @@ -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 ./ @@ -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 diff --git a/examples/fastapi-background-tasks/app/Dockerfile b/examples/fastapi-background-tasks/app/Dockerfile index 73063c7f..71cfee5d 100644 --- a/examples/fastapi-background-tasks/app/Dockerfile +++ b/examples/fastapi-background-tasks/app/Dockerfile @@ -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 ./ diff --git a/examples/fastapi-response-streaming-zip/README.md b/examples/fastapi-response-streaming-zip/README.md index ef6a98d9..ab1b8fc3 100644 --- a/examples/fastapi-response-streaming-zip/README.md +++ b/examples/fastapi-response-streaming-zip/README.md @@ -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. @@ -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 diff --git a/examples/fastapi-response-streaming-zip/template.yaml b/examples/fastapi-response-streaming-zip/template.yaml index e602d186..77a66a77 100644 --- a/examples/fastapi-response-streaming-zip/template.yaml +++ b/examples/fastapi-response-streaming-zip/template.yaml @@ -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 diff --git a/examples/fastapi-response-streaming/README.md b/examples/fastapi-response-streaming/README.md index f7d40448..8a9dc196 100644 --- a/examples/fastapi-response-streaming/README.md +++ b/examples/fastapi-response-streaming/README.md @@ -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 . . @@ -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`. diff --git a/examples/fastapi-response-streaming/app/Dockerfile b/examples/fastapi-response-streaming/app/Dockerfile index 42c3b793..6bb3f066 100644 --- a/examples/fastapi-response-streaming/app/Dockerfile +++ b/examples/fastapi-response-streaming/app/Dockerfile @@ -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 . . diff --git a/examples/fastapi-zip/README.md b/examples/fastapi-zip/README.md index 25049901..8b78b389 100644 --- a/examples/fastapi-zip/README.md +++ b/examples/fastapi-zip/README.md @@ -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. diff --git a/examples/fastapi-zip/template.yaml b/examples/fastapi-zip/template.yaml index 46fca313..5167032b 100644 --- a/examples/fastapi-zip/template.yaml +++ b/examples/fastapi-zip/template.yaml @@ -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 diff --git a/examples/fastapi/README.md b/examples/fastapi/README.md index 84525763..3111f9cb 100644 --- a/examples/fastapi/README.md +++ b/examples/fastapi/README.md @@ -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 ./ @@ -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 diff --git a/examples/fastapi/app/Dockerfile b/examples/fastapi/app/Dockerfile index 73063c7f..71cfee5d 100644 --- a/examples/fastapi/app/Dockerfile +++ b/examples/fastapi/app/Dockerfile @@ -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 ./ diff --git a/examples/flask-zip/README.md b/examples/flask-zip/README.md index 86c56310..e73d6084 100644 --- a/examples/flask-zip/README.md +++ b/examples/flask-zip/README.md @@ -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. diff --git a/examples/flask-zip/template.yaml b/examples/flask-zip/template.yaml index 31e4a699..d179af52 100644 --- a/examples/flask-zip/template.yaml +++ b/examples/flask-zip/template.yaml @@ -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 diff --git a/examples/flask/README.md b/examples/flask/README.md index 47e75dc1..a7f74865 100644 --- a/examples/flask/README.md +++ b/examples/flask/README.md @@ -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 @@ -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 diff --git a/examples/flask/app/Dockerfile b/examples/flask/app/Dockerfile index 1a763d2b..5a30f8ae 100644 --- a/examples/flask/app/Dockerfile +++ b/examples/flask/app/Dockerfile @@ -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 diff --git a/examples/gin-zip/template.yaml b/examples/gin-zip/template.yaml index d7531bba..4c9395d4 100644 --- a/examples/gin-zip/template.yaml +++ b/examples/gin-zip/template.yaml @@ -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 diff --git a/examples/gin/app/Dockerfile b/examples/gin/app/Dockerfile index 00d760da..b9a59813 100644 --- a/examples/gin/app/Dockerfile +++ b/examples/gin/app/Dockerfile @@ -8,7 +8,7 @@ RUN go mod download RUN GOOS=linux CGO_ENABLED=0 go build -o bootstrap . FROM alpine:3.9 RUN apk add ca-certificates -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 COPY --from=build_base /tmp/gin/bootstrap /app/bootstrap ENV PORT=8000 GIN_MODE=release diff --git a/examples/go-http-zip/template.yml b/examples/go-http-zip/template.yml index 1fe8bcf9..6c4f54d0 100644 --- a/examples/go-http-zip/template.yml +++ b/examples/go-http-zip/template.yml @@ -17,7 +17,7 @@ Resources: Variables: PORT: 3000 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 diff --git a/examples/javalin-zip/README.md b/examples/javalin-zip/README.md index ccaffa7a..93aabcbf 100644 --- a/examples/javalin-zip/README.md +++ b/examples/javalin-zip/README.md @@ -44,7 +44,7 @@ In the configuration we have to specify the AWS Lambda adapter as a layer and co REMOVE_BASE_PATH: /v1 AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23 ``` ### Remove the base path diff --git a/examples/javalin-zip/template.yaml b/examples/javalin-zip/template.yaml index d8b1bd37..2c746719 100644 --- a/examples/javalin-zip/template.yaml +++ b/examples/javalin-zip/template.yaml @@ -38,7 +38,7 @@ Resources: AWS_LWA_READINESS_CHECK_PORT: 8081 AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23 # - !Sub arn:aws:lambda:${AWS::Region}:753240598076:layer:LambdaAdapterLayerX86:20 Events: Root: diff --git a/examples/nextjs-response-streaming/Dockerfile b/examples/nextjs-response-streaming/Dockerfile index 2780fb95..78958b9a 100644 --- a/examples/nextjs-response-streaming/Dockerfile +++ b/examples/nextjs-response-streaming/Dockerfile @@ -5,7 +5,7 @@ COPY . . RUN npm ci && npm run build FROM public.ecr.aws/docker/library/node:20.9.0-slim as runner -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=3000 NODE_ENV=production diff --git a/examples/nextjs-zip/template.yaml b/examples/nextjs-zip/template.yaml index cdb8b53d..209a2fc7 100644 --- a/examples/nextjs-zip/template.yaml +++ b/examples/nextjs-zip/template.yaml @@ -26,7 +26,7 @@ Resources: RUST_LOG: info PORT: 8000 Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23 Events: RootEvent: Type: HttpApi diff --git a/examples/nextjs/app/Dockerfile b/examples/nextjs/app/Dockerfile index e86453d9..2c7078f4 100644 --- a/examples/nextjs/app/Dockerfile +++ b/examples/nextjs/app/Dockerfile @@ -4,7 +4,7 @@ COPY . . RUN npm ci && npm run build FROM public.ecr.aws/docker/library/node:20.9.0-slim as runner -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=3000 NODE_ENV=production ENV AWS_LWA_ENABLE_COMPRESSION=true WORKDIR /app diff --git a/examples/nginx-zip/template.yaml b/examples/nginx-zip/template.yaml index 6aa07912..dd2cb05a 100644 --- a/examples/nginx-zip/template.yaml +++ b/examples/nginx-zip/template.yaml @@ -24,7 +24,7 @@ Resources: RUST_LOG: debug PORT: 8080 Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23 - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:Nginx123X86:12 Events: Root: diff --git a/examples/nginx/Dockerfile b/examples/nginx/Dockerfile index e706fdd8..4e35b152 100644 --- a/examples/nginx/Dockerfile +++ b/examples/nginx/Dockerfile @@ -1,6 +1,6 @@ FROM public.ecr.aws/awsguru/nginx:1.23.2023.3.11.1 -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 # config files ADD nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf diff --git a/examples/nginx/README.md b/examples/nginx/README.md index 379e9c87..8aa33c9c 100644 --- a/examples/nginx/README.md +++ b/examples/nginx/README.md @@ -14,7 +14,7 @@ a [Dockerfile](Dockerfile). ```dockerfile FROM public.ecr.aws/awsguru/nginx:1.23.2023.3.11.1 -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 # config files ADD nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf @@ -28,7 +28,7 @@ EXPOSE 8080 Line 3 copies Lambda adapter binary into /opt/extensions. This is the main change to run the Nginx server 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 diff --git a/examples/php-zip/template.yaml b/examples/php-zip/template.yaml index ea434bb0..03154dac 100644 --- a/examples/php-zip/template.yaml +++ b/examples/php-zip/template.yaml @@ -33,7 +33,7 @@ Resources: RUST_LOG: debug PORT: 8080 Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23 - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:Php82FpmNginxX86:13 Events: Root: diff --git a/examples/php/Dockerfile b/examples/php/Dockerfile index d2bbcf57..c3eeb9b8 100644 --- a/examples/php/Dockerfile +++ b/examples/php/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /var/task/app RUN composer install --prefer-dist --optimize-autoloader --no-dev --no-interaction FROM public.ecr.aws/awsguru/php:82.2023.3.11.1 -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 COPY --from=builder /var/task /var/task # config files diff --git a/examples/php/README.md b/examples/php/README.md index 54f47122..e1a1c391 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -21,7 +21,7 @@ WORKDIR /var/task/app RUN composer install --prefer-dist --optimize-autoloader --no-dev --no-interaction FROM public.ecr.aws/awsguru/php:82.2023.3.11.1 -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 COPY --from=builder /var/task /var/task # config files diff --git a/examples/rust-actix-web-zip/template.yaml b/examples/rust-actix-web-zip/template.yaml index 734884ee..378cf2c4 100644 --- a/examples/rust-actix-web-zip/template.yaml +++ b/examples/rust-actix-web-zip/template.yaml @@ -22,7 +22,7 @@ Resources: Architectures: - arm64 Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23 Events: HttpEvents: Type: HttpApi # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api diff --git a/examples/rust-axum-zip/template.yaml b/examples/rust-axum-zip/template.yaml index 0ab131ae..28758225 100644 --- a/examples/rust-axum-zip/template.yaml +++ b/examples/rust-axum-zip/template.yaml @@ -20,7 +20,7 @@ Resources: Architectures: - arm64 Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:23 Events: Root: Type: HttpApi # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api diff --git a/examples/sinatra/README.md b/examples/sinatra/README.md index bd5776cb..5e9e976a 100644 --- a/examples/sinatra/README.md +++ b/examples/sinatra/README.md @@ -9,7 +9,7 @@ The top level folder is a typical AWS SAM project. The `app` directory is a Sina ```dockerfile FROM public.ecr.aws/docker/library/ruby:3.3 -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 Gemfile Gemfile.lock ./ RUN bundle install diff --git a/examples/sinatra/app/Dockerfile b/examples/sinatra/app/Dockerfile index 183eff3c..969795b6 100644 --- a/examples/sinatra/app/Dockerfile +++ b/examples/sinatra/app/Dockerfile @@ -1,5 +1,5 @@ FROM public.ecr.aws/docker/library/ruby:3.3 -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 ./src ./ RUN bundle install diff --git a/examples/sls/nestjs/Dockerfile b/examples/sls/nestjs/Dockerfile index 542477c1..de397b50 100644 --- a/examples/sls/nestjs/Dockerfile +++ b/examples/sls/nestjs/Dockerfile @@ -7,7 +7,7 @@ COPY . . RUN pnpm install && pnpm run build FROM public.ecr.aws/docker/library/node:18.19-slim as runner -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=8080 NODE_ENV=production ENV AWS_LWA_ENABLE_COMPRESSION=true diff --git a/examples/springboot-response-streaming-zip/README.md b/examples/springboot-response-streaming-zip/README.md index fa262e77..ad34c5ca 100644 --- a/examples/springboot-response-streaming-zip/README.md +++ b/examples/springboot-response-streaming-zip/README.md @@ -31,7 +31,7 @@ In the configuration we have to specify the AWS Lambda adapter as a layer and co AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap AWS_LWA_INVOKE_MODE: response_stream Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23 ``` In this template, we enable SnapStart for this function. SnapStart drastically reduces cold start time for Java functions using Firecracker MicroVM snapshotting technology. Read more about SnapStart [here](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html). diff --git a/examples/springboot-response-streaming-zip/template.yaml b/examples/springboot-response-streaming-zip/template.yaml index 25b5e473..985b2358 100644 --- a/examples/springboot-response-streaming-zip/template.yaml +++ b/examples/springboot-response-streaming-zip/template.yaml @@ -28,7 +28,7 @@ Resources: AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap AWS_LWA_INVOKE_MODE: response_stream 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 diff --git a/examples/springboot-zip/README.md b/examples/springboot-zip/README.md index 7d90d85c..b2d31b39 100644 --- a/examples/springboot-zip/README.md +++ b/examples/springboot-zip/README.md @@ -31,7 +31,7 @@ In the configuration we have to specify the AWS Lambda adapter as a layer and co REMOVE_BASE_PATH: /v1 AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23 ``` In this template, we enable SnapStart for this function. SnapStart drastically reduces cold start time for Java functions using Firecracker MicroVM snapshotting technology. Read more about SnapStart [here](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html). diff --git a/examples/springboot-zip/template.yaml b/examples/springboot-zip/template.yaml index 6d145318..7d86bc0f 100644 --- a/examples/springboot-zip/template.yaml +++ b/examples/springboot-zip/template.yaml @@ -28,7 +28,7 @@ Resources: REMOVE_BASE_PATH: /v1 AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap Layers: - - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:22 + - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23 Events: Root: Type: HttpApi diff --git a/examples/springboot/README.md b/examples/springboot/README.md index f559e7d5..28336887 100644 --- a/examples/springboot/README.md +++ b/examples/springboot/README.md @@ -16,7 +16,7 @@ COPY pom.xml ./ RUN mvn -q clean package FROM public.ecr.aws/docker/library/amazoncorretto:8u322-al2 -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 /opt COPY --from=build-image /task/target/petstore-0.0.1-SNAPSHOT.jar /opt @@ -26,7 +26,7 @@ CMD ["java", "-jar", "petstore-0.0.1-SNAPSHOT.jar", "--server.port=${PORT}"] Line 7 copies lambda adapter binary to /opt/extensions. This is the only change to run the Spring Boot 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 ``` ## Remove the base path diff --git a/examples/springboot/app/Dockerfile b/examples/springboot/app/Dockerfile index b5a8dfce..bcde51b5 100644 --- a/examples/springboot/app/Dockerfile +++ b/examples/springboot/app/Dockerfile @@ -5,7 +5,7 @@ COPY pom.xml ./ RUN mvn -q clean package FROM public.ecr.aws/docker/library/amazoncorretto:8u322-al2 -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 /opt COPY --from=build-image /task/target/petstore-0.0.1-SNAPSHOT.jar /opt diff --git a/examples/sqs-expressjs/README.md b/examples/sqs-expressjs/README.md index c8b30109..efb90a7a 100644 --- a/examples/sqs-expressjs/README.md +++ b/examples/sqs-expressjs/README.md @@ -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: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=8000 AWS_LWA_READINESS_CHECK_PROTOCOL=tcp WORKDIR "/var/task" ADD src/package.json /var/task/package.json @@ -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 diff --git a/examples/sqs-expressjs/app/Dockerfile b/examples/sqs-expressjs/app/Dockerfile index e36de9f9..753ba8a4 100644 --- a/examples/sqs-expressjs/app/Dockerfile +++ b/examples/sqs-expressjs/app/Dockerfile @@ -1,5 +1,5 @@ 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=8000 AWS_LWA_READINESS_CHECK_PROTOCOL=tcp WORKDIR "/var/task" ADD src/package.json /var/task/package.json