Skip to content

Commit fbc6894

Browse files
authored
Upgrade lambda support to newer Java 17 and 21 (#4088)
* Added changelog
1 parent fd82e28 commit fbc6894

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.ci/publish-aws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ for region in $ALL_AWS_REGIONS; do
3434
--layer-name="${FULL_LAYER_NAME}" \
3535
--description="AWS Lambda Extension Layer for the Elastic APM Java Agent" \
3636
--license-info="Apache-2.0" \
37-
--compatible-runtimes java8.al2 java11 \
37+
--compatible-runtimes java8.al2 java11 java17 java21 \
3838
--zip-file="fileb://${zip_file}")
3939
echo "${publish_output}" > "${AWS_FOLDER}/${region}"
4040
layer_version=$(echo "${publish_output}" | jq '.Version')

CHANGELOG.next-release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This file contains all changes which are not released yet.
99

1010
# Fixes
1111
<!--FIXES-START-->
12+
* Added missing java 17 and 21 compatible runtimes for published lambda layers - [#4088](https://github.com/elastic/apm-agent-java/pull/4088)
1213

1314
<!--FIXES-END-->
1415
# Features and enhancements

docs/reference/aws-lambda.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ To get started with APM for your Java AWS Lambda functions, follow the steps bel
2525
1. You need an APM Server to send APM data to. Follow the [APM Quick start](docs-content://solutions/observability/apm/get-started.md) if you have not set one up yet. For the best-possible performance, we recommend setting up APM on {{ecloud}} in the same AWS region as your AWS Lambda functions.
2626
2. Make sure you are using one of the supported AWS Lambda Java runtimes:
2727

28-
| Tags | Java Runtime | Operating System | Supported |
29-
| --- | --- | --- | --- |
30-
| 11 | Java 11 (Corretto) | Amazon Linux 2 | yes |
31-
| 8.al2 | Java 8 (Corretto) | Amazon Linux 2 | yes |
32-
| 8 | Java 8 (OpenJDK) | Amazon Linux 2018.03 | no |
28+
| Tags | Java Runtime | Operating System | Supported |
29+
|-------|--------------------| --- | --- |
30+
| 21 | Java 21 (Corretto) | Amazon Linux 2023 | yes |
31+
| 17 | Java 17 (Corretto) | Amazon Linux 2 | yes |
32+
| 11 | Java 11 (Corretto) | Amazon Linux 2 | yes |
33+
| 8.al2 | Java 8 (Corretto) | Amazon Linux 2 | yes |
34+
| 8 | Java 8 (OpenJDK) | Amazon Linux 2018.03 | no |
3335

3436

3537
### Step 1: Add the APM Layers to your Lambda function [add_the_apm_layers_to_your_lambda_function]

integration-tests/aws-lambda-test/src/test/java/co/elastic/apm/awslambda/AwsLambdaIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private static String createLambdaImage() throws IOException {
188188
{
189189
builder
190190
.withStatement(raw("FROM docker.elastic.co/observability/apm-lambda-extension-x86_64:1.5.5 AS lambda-extension"))
191-
.withStatement(raw("FROM --platform=linux/amd64 public.ecr.aws/lambda/java:11"))
191+
.withStatement(raw("FROM --platform=linux/amd64 public.ecr.aws/lambda/java:21"))
192192
.withStatement(raw("COPY --from=lambda-extension /opt/elastic-apm-extension /opt/extensions/elastic-apm-extension"))
193193
.copy("aws-lambda-test.jar", "${LAMBDA_TASK_ROOT}/lib/aws-lambda-test.jar")
194194
.cmd("[\"" + TestLambda.class.getName() + "\"]");

0 commit comments

Comments
 (0)