diff --git a/.github/actions/configure-maven-mirror/action.yml b/.github/actions/configure-maven-mirror/action.yml
new file mode 100644
index 000000000..ce309a8f7
--- /dev/null
+++ b/.github/actions/configure-maven-mirror/action.yml
@@ -0,0 +1,42 @@
+name: Configure Maven CodeArtifact mirror
+description: Configure Maven to resolve dependencies through the release CodeArtifact repository.
+
+runs:
+ using: composite
+ steps:
+ - shell: bash
+ run: |
+ CA_DOMAIN=aws-lambda
+ CA_REPO=maven-central-store
+
+ # Uses the ambient region and caller account.
+ TOKEN=$(aws codeartifact get-authorization-token \
+ --domain "$CA_DOMAIN" --query authorizationToken --output text)
+ echo "::add-mask::$TOKEN"
+
+ CA_URL=$(aws codeartifact get-repository-endpoint \
+ --domain "$CA_DOMAIN" --repository "$CA_REPO" --format maven \
+ --query repositoryEndpoint --output text)
+
+ # * routes all resolution through the mirror;
+ # deployment uses distributionManagement and is unaffected.
+ mkdir -p "$HOME/.m2"
+ cat > "$HOME/.m2/settings.xml" <
+
+
+ codeartifact-mirror
+ aws
+ ${TOKEN}
+
+
+
+
+ codeartifact-mirror
+ release CodeArtifact Maven Central proxy
+ ${CA_URL}
+ *
+
+
+
+ EOF
diff --git a/.github/actions/configure-release-aws-credentials/action.yml b/.github/actions/configure-release-aws-credentials/action.yml
new file mode 100644
index 000000000..6a34f6480
--- /dev/null
+++ b/.github/actions/configure-release-aws-credentials/action.yml
@@ -0,0 +1,28 @@
+name: "Configure AWS credentials for release (OIDC)"
+description: >
+ Assumes the release OIDC role via aws-actions/configure-aws-credentials so the
+ job can read the signing key and Sonatype token from Secrets Manager. Pinning
+ of the underlying action lives here so it is updated in one place.
+
+inputs:
+ aws-region:
+ description: "AWS region to operate in."
+ required: true
+ role-to-assume:
+ description: "ARN of the OIDC role to assume."
+ required: true
+ role-session-name:
+ description: "Session name for the assumed role (helps distinguish callers in CloudTrail)."
+ required: true
+
+runs:
+ using: composite
+ steps:
+ - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
+ with:
+ aws-region: ${{ inputs.aws-region }}
+ role-to-assume: ${{ inputs.role-to-assume }}
+ role-session-name: ${{ inputs.role-session-name }}
+ # Kept short: the job only needs the role briefly to read two secrets.
+ # 900s is STS's minimum for assume-role; anything lower is rejected.
+ role-duration-seconds: 900
diff --git a/.github/actions/resolve-release-version/action.yml b/.github/actions/resolve-release-version/action.yml
new file mode 100644
index 000000000..06d3f4f1e
--- /dev/null
+++ b/.github/actions/resolve-release-version/action.yml
@@ -0,0 +1,54 @@
+name: "Resolve and validate release version"
+description: >
+ Reads the module POM version (the source of truth), verifies it is a
+ -SNAPSHOT, and derives the effective release version (the optional override,
+ or the POM version with -SNAPSHOT stripped). Exports CURRENT_VERSION and
+ EFFECTIVE_RELEASE_VERSION to the job environment for subsequent steps.
+
+inputs:
+ module:
+ description: "Module directory containing the pom.xml to release."
+ required: true
+ release-version-override:
+ description: "Optional release version; defaults to the POM version without -SNAPSHOT."
+ required: false
+ default: ""
+ validate-module-dir:
+ description: "Fail if the module directory or its pom.xml is missing (use for the choice-driven workflow)."
+ required: false
+ default: "false"
+
+runs:
+ using: composite
+ steps:
+ - name: Resolve and validate release version
+ shell: bash
+ env:
+ MODULE: ${{ inputs.module }}
+ RELEASE_VERSION_OVERRIDE: ${{ inputs.release-version-override }}
+ VALIDATE_MODULE_DIR: ${{ inputs.validate-module-dir }}
+ run: |
+ if [[ "$VALIDATE_MODULE_DIR" == "true" ]]; then
+ if [[ ! -d "$MODULE" ]]; then
+ echo "::error::Module directory '$MODULE' does not exist"
+ exit 1
+ fi
+ if [[ ! -f "$MODULE/pom.xml" ]]; then
+ echo "::error::No pom.xml found in '$MODULE'"
+ exit 1
+ fi
+ fi
+
+ # The POM version is the source of truth and must be a SNAPSHOT.
+ CURRENT_VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version --file "$MODULE/pom.xml")
+ CURRENT_VERSION="${CURRENT_VERSION//[$'\r\n']/}"
+ if [[ "$CURRENT_VERSION" != *-SNAPSHOT ]]; then
+ echo "::error::POM version '$CURRENT_VERSION' is not a SNAPSHOT"
+ exit 1
+ fi
+
+ # Optional override; default strips -SNAPSHOT.
+ EFFECTIVE_RELEASE_VERSION="${RELEASE_VERSION_OVERRIDE:-${CURRENT_VERSION%-SNAPSHOT}}"
+
+ echo "CURRENT_VERSION=$CURRENT_VERSION" >> "$GITHUB_ENV"
+ echo "EFFECTIVE_RELEASE_VERSION=$EFFECTIVE_RELEASE_VERSION" >> "$GITHUB_ENV"
diff --git a/.github/test-matrix.json b/.github/test-matrix.json
new file mode 100644
index 000000000..7e6539cb6
--- /dev/null
+++ b/.github/test-matrix.json
@@ -0,0 +1,16 @@
+{
+ "arch": [
+ {
+ "runner": "ubuntu-latest",
+ "label": "x64",
+ "sam_arch": "x86_64",
+ "java_suffix": "X64"
+ },
+ {
+ "runner": "ubuntu-24.04-arm",
+ "label": "arm64",
+ "sam_arch": "arm64",
+ "java_suffix": "ARM64"
+ }
+ ]
+}
diff --git a/.github/workflows/build-integration-test.yml b/.github/workflows/build-integration-test.yml
new file mode 100644
index 000000000..2a6bb30c5
--- /dev/null
+++ b/.github/workflows/build-integration-test.yml
@@ -0,0 +1,86 @@
+# this workflow verifies that the integration test Lambda function builds successfully.
+# it does NOT deploy or run the tests (that requires AWS credentials and is done in
+# run-integration-test.yml).
+
+name: Build integration tests
+
+on:
+ push:
+ branches: [ main ]
+ paths:
+ - 'aws-lambda-java-log4j2/**'
+ - 'aws-lambda-java-core/**'
+ - 'lambda-integration-tests/**'
+ pull_request:
+ branches: [ '*' ]
+ paths:
+ - 'aws-lambda-java-log4j2/**'
+ - 'aws-lambda-java-core/**'
+ - 'lambda-integration-tests/**'
+ - '.github/workflows/build-integration-test.yml'
+
+permissions:
+ contents: read
+
+jobs:
+ load-matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set.outputs.matrix }}
+ steps:
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+
+ - name: Load test matrix
+ id: set
+ run: |
+ MATRIX=$(jq -c '.' .github/test-matrix.json)
+ echo "matrix=${MATRIX}" >> "$GITHUB_OUTPUT"
+
+ build-arch:
+ needs: load-matrix
+ runs-on: ${{ matrix.arch.runner }}
+ strategy:
+ fail-fast: false
+ matrix: ${{ fromJson(needs.load-matrix.outputs.matrix) }}
+ name: "build (${{ matrix.arch.label }})"
+ steps:
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+
+ - name: Set up JDK
+ uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
+ with:
+ java-version: |
+ 8
+ 21
+ distribution: corretto
+ cache: maven
+
+ - name: Install core with Maven
+ run: |
+ export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
+ mvn -B install --file aws-lambda-java-core/pom.xml
+
+ - name: Install log4j2 with Maven
+ run: |
+ export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
+ mvn -B install --file aws-lambda-java-log4j2/pom.xml
+
+ # build the integration test function
+ # this verifies that the function compiles and packages correctly.
+ # the tests will run in run-integration-test.yml which deploys to AWS.
+ - name: Package integration test function
+ run: |
+ export JAVA_HOME=$JAVA_HOME_21_${{ matrix.arch.java_suffix }}
+ mvn -B package --file lambda-integration-tests/log4j2-test-function/pom.xml
+
+ build:
+ needs: build-arch
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check build results
+ run: |
+ if [ "${{ needs.build-arch.result }}" != "success" ]; then
+ echo "Build failed on one or more architectures"
+ exit 1
+ fi
diff --git a/.github/workflows/release-runtime-interface-client.yml b/.github/workflows/release-runtime-interface-client.yml
new file mode 100644
index 000000000..e41dcfc61
--- /dev/null
+++ b/.github/workflows/release-runtime-interface-client.yml
@@ -0,0 +1,361 @@
+name: Release RIC to Maven Central
+
+# RIC ships a native JNI lib for 4 targets + a main JAR (5 artifacts). Each
+# native lib is built on its own architecture (x86_64 and aarch64 CodeBuild
+# runners) instead of emulating with QEMU. A build matrix produces the
+# classifier JARs, then one job assembles and publishes them.
+
+on:
+ workflow_dispatch:
+ inputs:
+ releaseVersion:
+ description: 'Release version override (optional; defaults to the POM version without -SNAPSHOT)'
+ required: false
+ type: string
+ developmentVersion:
+ description: 'Next development version override (optional, must end with -SNAPSHOT)'
+ required: false
+ type: string
+ skip_publish:
+ description: 'Skip publish (dry-run validation)'
+ required: false
+ type: boolean
+ default: false
+
+permissions:
+ contents: write # push release commit and tag
+ id-token: write # assume the OIDC role for secret retrieval
+
+# Share the repo-wide "release" group with release.yml so RIC and the pure-Java
+# modules can never publish concurrently. Never cancel in-flight: it could leave
+# a half-published state.
+concurrency:
+ group: release
+ cancel-in-progress: false
+
+env:
+ MODULE: aws-lambda-java-runtime-interface-client
+ RELEASE_VERSION_INPUT: ${{ github.event.inputs.releaseVersion }}
+ DEVELOPMENT_VERSION_INPUT: ${{ github.event.inputs.developmentVersion }}
+ MAVEN_ARGS: "-B --no-transfer-progress"
+ AWS_REGION: ${{ vars.AWS_REGION_MAVEN_RELEASE }}
+ OIDC_ROLE_ARN: ${{ secrets.AWS_ROLE_MAVEN_RELEASE }}
+ # ECR pull-through cache used for the native JNI base images. ECR_REGISTRY is
+ # the login target; BASE_REGISTRY (with the /ecr-public prefix) is passed to
+ # the Dockerfiles as a build-arg.
+ ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_REGION_MAVEN_RELEASE }}.amazonaws.com
+ BASE_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_REGION_MAVEN_RELEASE }}.amazonaws.com/ecr-public
+
+jobs:
+ # Build each architecture's native libs (glibc + musl) on a native runner.
+ build-natives:
+ strategy:
+ fail-fast: true
+ matrix:
+ include:
+ - arch: x86_64
+ runner: codebuild-aws-lambda-java-libs-test-trigger-x86-${{ github.run_id }}-${{ github.run_attempt }}
+ profiles: linux-x86_64 linux_musl-x86_64
+ - arch: aarch64
+ runner: codebuild-aws-lambda-java-libs-test-trigger-arm64-${{ github.run_id }}-${{ github.run_attempt }}
+ profiles: linux-aarch64 linux_musl-aarch64
+ runs-on: ${{ matrix.runner }}
+ timeout-minutes: 45
+ steps:
+ # Manual (workflow_dispatch) releases must only run from main, never from
+ # an arbitrary branch that could carry unreviewed release logic. Guarding
+ # the first job blocks the whole pipeline (release needs build-natives).
+ - name: Verify release branch
+ run: |
+ if [[ "$GITHUB_REF_NAME" != "main" ]]; then
+ echo "::error::Releases must run from the main branch, got '$GITHUB_REF_NAME'"
+ exit 1
+ fi
+
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+
+ # Use the CodeBuild image's preinstalled Corretto 8. The image ships it at
+ # $JAVA_8_HOME but defaults JAVA_HOME to Java 25, so point JAVA_HOME/PATH at
+ # 8. Avoids actions/setup-java, which fetches from corretto.github.io +
+ # corretto.aws, both blocked by the runner egress lock. $JAVA_8_HOME
+ # resolves per-arch (x86_64/aarch64).
+ - name: Use the runner image's preinstalled Corretto 8
+ run: |
+ echo "JAVA_HOME=$JAVA_8_HOME" >> "$GITHUB_ENV"
+ echo "$JAVA_8_HOME/bin" >> "$GITHUB_PATH"
+ "$JAVA_8_HOME/bin/java" -version
+ mkdir -p "$HOME/.m2"
+ cat > "$HOME/.m2/toolchains.xml" <
+
+
+ jdk
+ 8
+ $JAVA_8_HOME
+
+
+ EOF
+
+ # Route all mvn resolution through the CodeArtifact mirror. Must precede
+ # resolve-release-version, which invokes `mvn help:evaluate`. Ambient
+ # CodeBuild runner-role creds supply the token; no OIDC step in this job.
+ - name: Configure Maven CodeArtifact mirror
+ uses: ./.github/actions/configure-maven-mirror
+
+ - name: Resolve and validate release version
+ uses: ./.github/actions/resolve-release-version
+ with:
+ module: ${{ env.MODULE }}
+ release-version-override: ${{ env.RELEASE_VERSION_INPUT }}
+
+ # The native JNI build shells out to `docker build` against the ECR
+ # pull-through cache (see src/main/jni/Dockerfile.*). Authenticate first so
+ # the base-image pulls don't hit public.ecr.aws. Uses ambient runner creds.
+ - name: Log in to Amazon ECR (pull-through cache)
+ run: |
+ aws ecr get-login-password --region "$AWS_REGION" \
+ | docker login --username AWS --password-stdin "$ECR_REGISTRY"
+
+ # -DskipTests: only installed so the module compiles, not released here.
+ - name: Install intra-repo dependencies
+ run: |
+ for dep in aws-lambda-java-core aws-lambda-java-serialization; do
+ mvn install -DskipTests --file "$dep/pom.xml"
+ done
+
+ # Build at the release version (matches the JAR names the release job
+ # attaches).
+ - name: Build native classifier JARs (${{ matrix.arch }})
+ env:
+ IS_JAVA_8: true
+ run: |
+ mvn versions:set -DnewVersion="$EFFECTIVE_RELEASE_VERSION" -DgenerateBackupPoms=false --file "$MODULE/pom.xml"
+ for profile in ${{ matrix.profiles }}; do
+ echo "::group::Building $profile"
+ mvn package -P "$profile" -DmultiArch=false -DskipTests --file "$MODULE/pom.xml"
+ echo "::endgroup::"
+ done
+
+ # JARs to attach + .so files to assemble the fat main JAR.
+ - name: Upload native artifacts
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
+ with:
+ name: ric-natives-${{ matrix.arch }}
+ if-no-files-found: error
+ path: |
+ ${{ env.MODULE }}/target/*-linux*.jar
+ ${{ env.MODULE }}/target/classes/jni/*.so
+
+ # Remove the user settings holding the CodeArtifact mirror token once the
+ # build is done. Ephemeral runner, so defence-in-depth, not load-bearing.
+ - name: Scrub Maven settings
+ if: always()
+ run: rm -f "$HOME/.m2/settings.xml"
+
+ # Assemble all native builds and publish.
+ release:
+ needs: build-natives
+ runs-on: codebuild-aws-lambda-java-libs-test-trigger-x86-${{ github.run_id }}-${{ github.run_attempt }}
+ environment: Release
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ fetch-depth: 0 # full history for tagging/pushing
+
+ # Use the CodeBuild image's preinstalled Corretto 8. The image ships it at
+ # $JAVA_8_HOME but defaults JAVA_HOME to Java 25, so point JAVA_HOME/PATH at
+ # 8. Avoids actions/setup-java, which fetches from corretto.github.io +
+ # corretto.aws, both blocked by the runner egress lock. $JAVA_8_HOME
+ # resolves per-arch (x86_64/aarch64).
+ - name: Use the runner image's preinstalled Corretto 8
+ run: |
+ echo "JAVA_HOME=$JAVA_8_HOME" >> "$GITHUB_ENV"
+ echo "$JAVA_8_HOME/bin" >> "$GITHUB_PATH"
+ "$JAVA_8_HOME/bin/java" -version
+ mkdir -p "$HOME/.m2"
+ cat > "$HOME/.m2/toolchains.xml" <
+
+
+ jdk
+ 8
+ $JAVA_8_HOME
+
+
+ EOF
+
+ # Route all mvn resolution through the CodeArtifact mirror. Must precede
+ # resolve-release-version (which invokes `mvn help:evaluate`) and the OIDC
+ # step (which would shadow the runner-role creds this needs). Runs on every
+ # path, since dependency resolution happens on dry-runs too.
+ - name: Configure Maven CodeArtifact mirror
+ uses: ./.github/actions/configure-maven-mirror
+
+ - name: Resolve and validate release version
+ uses: ./.github/actions/resolve-release-version
+ with:
+ module: ${{ env.MODULE }}
+ release-version-override: ${{ env.RELEASE_VERSION_INPUT }}
+
+ # The native JNI build shells out to `docker build` against the ECR
+ # pull-through cache (see src/main/jni/Dockerfile.*). Authenticate first so
+ # the base-image pulls don't hit public.ecr.aws. Uses ambient runner creds.
+ - name: Log in to Amazon ECR (pull-through cache)
+ run: |
+ aws ecr get-login-password --region "$AWS_REGION" \
+ | docker login --username AWS --password-stdin "$ECR_REGISTRY"
+
+ - name: Resolve next development version and tag
+ run: |
+ # Next development version: use the override, or bump the patch.
+ if [[ -n "$DEVELOPMENT_VERSION_INPUT" ]]; then
+ if [[ "$DEVELOPMENT_VERSION_INPUT" != *-SNAPSHOT ]]; then
+ echo "::error::developmentVersion '$DEVELOPMENT_VERSION_INPUT' must end with -SNAPSHOT"
+ exit 1
+ fi
+ NEXT_DEV_VERSION="$DEVELOPMENT_VERSION_INPUT"
+ else
+ IFS='.' read -r MA MI PA <<< "$EFFECTIVE_RELEASE_VERSION"
+ NEXT_DEV_VERSION="${MA}.${MI}.$((PA + 1))-SNAPSHOT"
+ fi
+
+ echo "NEXT_DEV_VERSION=$NEXT_DEV_VERSION" >> "$GITHUB_ENV"
+ echo "TAG_NAME=${MODULE}-${EFFECTIVE_RELEASE_VERSION}" >> "$GITHUB_ENV"
+ echo "::notice::Releasing $MODULE $EFFECTIVE_RELEASE_VERSION (next dev $NEXT_DEV_VERSION)"
+
+ - name: Configure git user
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+
+ # -DskipTests: only installed so the module compiles, not released here.
+ - name: Install intra-repo dependencies
+ run: |
+ for dep in aws-lambda-java-core aws-lambda-java-serialization; do
+ mvn install -DskipTests --file "$dep/pom.xml"
+ done
+
+ - name: Set release version
+ run: mvn versions:set -DnewVersion="$EFFECTIVE_RELEASE_VERSION" -DgenerateBackupPoms=false --file "$MODULE/pom.xml"
+
+ # Test gate before publish.
+ - name: Run tests
+ env:
+ IS_JAVA_8: true
+ run: mvn test -DargLineForReflectionTestOnly="" --file "$MODULE/pom.xml"
+
+ # JARs to attach + .so files for the fat main JAR.
+ - name: Download native artifacts
+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
+ with:
+ pattern: ric-natives-*
+ path: ric-natives
+
+ - name: Stage native artifacts
+ run: |
+ mkdir -p "$MODULE/target/classes/jni"
+ find ric-natives -name '*.jar' -exec cp {} "$MODULE/target/" \;
+ find ric-natives -name '*.so' -exec cp {} "$MODULE/target/classes/jni/" \;
+ echo "Staged native artifacts:"
+ ls -1 "$MODULE/target/"*-linux*.jar "$MODULE/target/classes/jni/"*.so
+
+ - name: Configure AWS credentials (OIDC)
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ uses: ./.github/actions/configure-release-aws-credentials
+ with:
+ aws-region: ${{ env.AWS_REGION }}
+ role-to-assume: ${{ env.OIDC_ROLE_ARN }}
+ role-session-name: GitHubActionsRicMavenCentralRelease
+
+ # Fetch signing material and publish in a single step so the GPG passphrase
+ # and Sonatype token stay in this shell and never cross a $GITHUB_ENV
+ # boundary, where a later (possibly compromised) step could read them.
+ # -DmultiArch=false builds only the host .so; the aarch_64 .so is already
+ # staged, so the main JAR still bundles all four. build-helper attaches
+ # the staged classifier JARs. Gate already ran, so -DskipTests.
+ - name: Publish to Maven Central
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ env:
+ IS_JAVA_8: true
+ run: |
+ # Scrub the settings.xml (contains the Sonatype token) and the keyring
+ # on exit, so no sensitive file is left on the runner even on failure.
+ MAVEN_SETTINGS="$RUNNER_TEMP/settings.xml"
+ export GNUPGHOME=$(mktemp -d)
+ trap 'rm -rf "$MAVEN_SETTINGS" "$GNUPGHOME"' EXIT
+
+ # --- Signing key + Sonatype token (shared secrets from LambdaMavenDeploy) ---
+ GPG_JSON=$(aws secretsmanager get-secret-value --secret-id lambda-runtimes/java/gpg-signing-key --query SecretString --output text)
+ CREDS_JSON=$(aws secretsmanager get-secret-value --secret-id lambda-runtimes/java/maven-sonatype-creds --query SecretString --output text)
+ GPG_PRIVATE_KEY=$(jq -r '.private' <<< "$GPG_JSON")
+ GPG_PASSPHRASE=$(jq -r '.passphrase' <<< "$GPG_JSON")
+ SONATYPE_USERNAME=$(jq -r '."maven-central-login"' <<< "$CREDS_JSON")
+ SONATYPE_PASSWORD=$(jq -r '."maven-central-password"' <<< "$CREDS_JSON")
+ echo "::add-mask::$GPG_PASSPHRASE"
+ echo "::add-mask::$SONATYPE_USERNAME"
+ echo "::add-mask::$SONATYPE_PASSWORD"
+
+ # Import the key with loopback pinentry so Maven can sign non-interactively.
+ chmod 700 "$GNUPGHOME"
+ echo "allow-loopback-pinentry" > "$GNUPGHOME/gpg-agent.conf"
+ echo "pinentry-mode loopback" > "$GNUPGHOME/gpg.conf"
+ gpgconf --kill gpg-agent || true
+ gpg --batch --import <<< "$GPG_PRIVATE_KEY"
+ GPG_KEYNAME=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}')
+
+ # Global settings holding only the Sonatype "central" server for upload.
+ # Passed to Maven as -gs (global) so it MERGES with the CodeArtifact
+ # mirror in ~/.m2/settings.xml (user) that the mirror step wrote: deps
+ # resolve through the mirror, upload goes to central, and the mirror
+ # token stays in that user file instead of being re-passed here.
+ {
+ echo ''
+ echo "central"
+ echo "${SONATYPE_USERNAME}"
+ echo "${SONATYPE_PASSWORD}"
+ echo ''
+ } > "$MAVEN_SETTINGS"
+
+ # --- Publish --- (-gs: merge Sonatype creds with the ~/.m2 mirror)
+ mvn deploy -Prelease -DskipTests -DmultiArch=false \
+ -gs "$MAVEN_SETTINGS" \
+ -Dgpg.keyname="$GPG_KEYNAME" -Dgpg.passphrase="$GPG_PASSPHRASE" \
+ --file "$MODULE/pom.xml"
+
+ - name: Tag and push (only after publish succeeds)
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ run: |
+ git commit -am "chore(ric): release ${EFFECTIVE_RELEASE_VERSION}"
+ git tag "$TAG_NAME"
+ mvn versions:set -DnewVersion="$NEXT_DEV_VERSION" -DgenerateBackupPoms=false --file "$MODULE/pom.xml"
+ git commit -am "chore(ric): prepare next development ${NEXT_DEV_VERSION}"
+ git push --atomic origin "HEAD:${GITHUB_REF_NAME}" "refs/tags/${TAG_NAME}"
+
+ # Dry-run: validate assembly, no publish/push.
+ - name: Dry-run assemble (no publish)
+ if: ${{ github.event.inputs.skip_publish == 'true' }}
+ env:
+ IS_JAVA_8: true
+ run: mvn package -DskipTests -DmultiArch=false --file "$MODULE/pom.xml"
+
+ # Nothing was pushed, so this only cleans the runner.
+ - name: Roll back local tag on failure
+ if: ${{ failure() && github.event.inputs.skip_publish != 'true' }}
+ run: |
+ git tag -d "$TAG_NAME" 2>/dev/null || true
+ echo "::warning::Release failed. The remote was not modified; safe to retry."
+
+ - name: Summary
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ run: |
+ echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
+ echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY
+ echo "| Module | \`$MODULE\` |" >> $GITHUB_STEP_SUMMARY
+ echo "| Version | \`$EFFECTIVE_RELEASE_VERSION\` |" >> $GITHUB_STEP_SUMMARY
+ echo "| Tag | \`$TAG_NAME\` |" >> $GITHUB_STEP_SUMMARY
+ echo "| Artifacts | main JAR + linux/linux_musl x x86_64/aarch_64 classifier JARs |" >> $GITHUB_STEP_SUMMARY
+ echo "| Built natively | x86_64 and aarch_64 on CodeBuild runners (no QEMU) |" >> $GITHUB_STEP_SUMMARY
+ echo "| Maven Central | [com.amazonaws:$MODULE:$EFFECTIVE_RELEASE_VERSION](https://central.sonatype.com/artifact/com.amazonaws/$MODULE/$EFFECTIVE_RELEASE_VERSION) |" >> $GITHUB_STEP_SUMMARY
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..7ff834e56
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,297 @@
+name: Release to Maven Central
+
+# Builds, tests, and publishes a module to Maven Central in one environment.
+
+on:
+ workflow_dispatch:
+ inputs:
+ module:
+ description: 'Module to release (directory name, e.g. aws-lambda-java-log4j2)'
+ required: true
+ type: choice
+ # aws-lambda-java-runtime-interface-client is intentionally excluded: it
+ # ships a cross-compiled JNI native library and has its own dedicated
+ # pipeline, .github/workflows/release-runtime-interface-client.yml.
+ options:
+ - aws-lambda-java-core
+ - aws-lambda-java-events
+ - aws-lambda-java-events-sdk-transformer
+ - aws-lambda-java-log4j2
+ - aws-lambda-java-serialization
+ - aws-lambda-java-tests
+ releaseVersion:
+ description: 'Release version override (optional; defaults to the POM version without -SNAPSHOT)'
+ required: false
+ type: string
+ developmentVersion:
+ description: 'Next development version override (optional, must end with -SNAPSHOT)'
+ required: false
+ type: string
+ skip_publish:
+ description: 'Skip publish (dry-run validation)'
+ required: false
+ type: boolean
+ default: false
+
+permissions:
+ contents: write
+ id-token: write
+
+# Serialize all releases repo-wide to avoid concurrent pushes racing on the
+# default branch. Never cancel in-flight: it could leave a half-published state.
+concurrency:
+ group: release
+ cancel-in-progress: false
+
+env:
+ MODULE: ${{ github.event.inputs.module }}
+ RELEASE_VERSION_INPUT: ${{ github.event.inputs.releaseVersion }}
+ DEVELOPMENT_VERSION_INPUT: ${{ github.event.inputs.developmentVersion }}
+ # Batch mode + no transfer-progress spam for every Maven call (Maven 3.9+).
+ MAVEN_ARGS: "-B --no-transfer-progress"
+ AWS_REGION: ${{ vars.AWS_REGION_MAVEN_RELEASE }}
+ OIDC_ROLE_ARN: ${{ secrets.AWS_ROLE_MAVEN_RELEASE }}
+
+jobs:
+ # Pre-publish gate for log4j2: deploy a real Lambda, invoke it,
+ # and assert the log line reaches CloudWatch. Binds the end-to-end validation
+ # to the publish event itself. Skipped for every other module, which are
+ # covered by their own tests (or the cross-module gate below).
+ integration-test:
+ if: ${{ github.event.inputs.module == 'aws-lambda-java-log4j2' }}
+ uses: ./.github/workflows/run-integration-test.yml
+ secrets: inherit
+
+ release:
+ needs: [integration-test]
+ # Publish when the gate passed, or when it was skipped for a non-log4j2
+ # module. A failed or cancelled gate blocks the release.
+ if: ${{ always() && (needs.integration-test.result == 'success' || needs.integration-test.result == 'skipped') }}
+ runs-on: codebuild-aws-lambda-java-libs-test-trigger-x86-${{ github.run_id }}-${{ github.run_attempt }}
+ environment: Release
+ timeout-minutes: 30
+
+ steps:
+ # Manual (workflow_dispatch) releases must only run from main, never from
+ # an arbitrary branch that could carry unreviewed release logic.
+ - name: Verify release branch
+ run: |
+ if [[ "$GITHUB_REF_NAME" != "main" ]]; then
+ echo "::error::Releases must run from the main branch, got '$GITHUB_REF_NAME'"
+ exit 1
+ fi
+
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+ with:
+ fetch-depth: 0 # full history for tagging/pushing
+
+ # Use the CodeBuild image's preinstalled Corretto 8. The image ships it at
+ # $JAVA_8_HOME but defaults JAVA_HOME to Java 25, so point JAVA_HOME/PATH at
+ # 8. Avoids actions/setup-java, which fetches from corretto.github.io +
+ # corretto.aws, both blocked by the runner egress lock. $JAVA_8_HOME
+ # resolves per-arch (x86_64/aarch64).
+ - name: Use the runner image's preinstalled Corretto 8
+ run: |
+ echo "JAVA_HOME=$JAVA_8_HOME" >> "$GITHUB_ENV"
+ echo "$JAVA_8_HOME/bin" >> "$GITHUB_PATH"
+ "$JAVA_8_HOME/bin/java" -version
+ mkdir -p "$HOME/.m2"
+ cat > "$HOME/.m2/toolchains.xml" <
+
+
+ jdk
+ 8
+ $JAVA_8_HOME
+
+
+ EOF
+
+ # Route all mvn resolution through the CodeArtifact mirror. Runs before the
+ # OIDC step (which would shadow the runner-role creds this needs) and on
+ # every path, since dependency resolution happens on dry-runs too.
+ - name: Configure Maven CodeArtifact mirror
+ uses: ./.github/actions/configure-maven-mirror
+
+ - name: Resolve and validate release version
+ uses: ./.github/actions/resolve-release-version
+ with:
+ module: ${{ env.MODULE }}
+ release-version-override: ${{ env.RELEASE_VERSION_INPUT }}
+ validate-module-dir: "true"
+
+ - name: Validate development version override
+ run: |
+ if [[ -n "$DEVELOPMENT_VERSION_INPUT" && "$DEVELOPMENT_VERSION_INPUT" != *-SNAPSHOT ]]; then
+ echo "::error::developmentVersion '$DEVELOPMENT_VERSION_INPUT' must end with -SNAPSHOT"
+ exit 1
+ fi
+ echo "::notice::Releasing $MODULE $EFFECTIVE_RELEASE_VERSION (POM currently $CURRENT_VERSION)"
+
+ - name: Configure git user
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+
+ - name: Install intra-repo dependencies
+ run: |
+ # Installed so the target compiles. -DskipTests: not released here,
+ # only the target module gets the full verify gate below.
+ declare -A DEPS
+ DEPS[aws-lambda-java-core]=""
+ DEPS[aws-lambda-java-events]=""
+ DEPS[aws-lambda-java-serialization]=""
+ DEPS[aws-lambda-java-log4j2]="aws-lambda-java-core"
+ DEPS[aws-lambda-java-events-sdk-transformer]="aws-lambda-java-events"
+ DEPS[aws-lambda-java-tests]="aws-lambda-java-core aws-lambda-java-serialization aws-lambda-java-events"
+
+ DEP_LIST="${DEPS[$MODULE]}"
+ if [[ -n "$DEP_LIST" ]]; then
+ for dep in $DEP_LIST; do
+ echo "::group::Installing dependency: $dep"
+ mvn install -DskipTests --file "$dep/pom.xml"
+ echo "::endgroup::"
+ done
+ else
+ echo "::notice::No intra-repo dependencies for $MODULE"
+ fi
+
+ - name: Run tests
+ run: mvn verify --file "$MODULE/pom.xml"
+
+ # Cross-module gate: serialization has no tests in its own build, so the
+ # `mvn verify` above exercises nothing. Its behavioral coverage lives in
+ # aws-lambda-java-tests, which depends on serialization via a version
+ # property. Install the just-built serialization and run that suite
+ # against it, so we never publish serialization the suite hasn't exercised.
+ - name: Run cross-module test gate
+ run: |
+ case "$MODULE" in
+ aws-lambda-java-serialization)
+ MOD_VER=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version --file "$MODULE/pom.xml")
+ MOD_VER="${MOD_VER//[$'\r\n']/}"
+ echo "::group::Installing $MODULE $MOD_VER for the gate"
+ mvn install -DskipTests --file "$MODULE/pom.xml"
+ echo "::endgroup::"
+ echo "::notice::Gating $MODULE on aws-lambda-java-tests (aws-lambda-java-serialization.version=$MOD_VER)"
+ mvn verify -Daws-lambda-java-serialization.version="$MOD_VER" --file aws-lambda-java-tests/pom.xml
+ ;;
+ *)
+ echo "::notice::No cross-module test gate for $MODULE"
+ ;;
+ esac
+
+ - name: Configure AWS credentials (OIDC)
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ uses: ./.github/actions/configure-release-aws-credentials
+ with:
+ aws-region: ${{ env.AWS_REGION }}
+ role-to-assume: ${{ env.OIDC_ROLE_ARN }}
+ role-session-name: GitHubActionsMavenCentralRelease
+
+ # Fetch signing material and publish in a single step so the GPG passphrase
+ # and Sonatype token stay in this shell and never cross a $GITHUB_ENV
+ # boundary, where a later (possibly compromised) step could read them.
+ # prepare/perform aren't atomic: prepare locally, publish, push only after.
+ - name: Release (prepare locally, publish, then push)
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ run: |
+ # Scrub the settings.xml (contains the Sonatype token) and the keyring
+ # on exit, so no sensitive file is left on the runner even on failure.
+ MAVEN_SETTINGS="$RUNNER_TEMP/settings.xml"
+ export GNUPGHOME=$(mktemp -d)
+ trap 'rm -rf "$MAVEN_SETTINGS" "$GNUPGHOME"' EXIT
+
+ # --- Signing key + Sonatype token (shared secrets from LambdaMavenDeploy) ---
+ GPG_JSON=$(aws secretsmanager get-secret-value --secret-id lambda-runtimes/java/gpg-signing-key --query SecretString --output text)
+ CREDS_JSON=$(aws secretsmanager get-secret-value --secret-id lambda-runtimes/java/maven-sonatype-creds --query SecretString --output text)
+ GPG_PRIVATE_KEY=$(jq -r '.private' <<< "$GPG_JSON")
+ GPG_PASSPHRASE=$(jq -r '.passphrase' <<< "$GPG_JSON")
+ SONATYPE_USERNAME=$(jq -r '."maven-central-login"' <<< "$CREDS_JSON")
+ SONATYPE_PASSWORD=$(jq -r '."maven-central-password"' <<< "$CREDS_JSON")
+ echo "::add-mask::$GPG_PASSPHRASE"
+ echo "::add-mask::$SONATYPE_USERNAME"
+ echo "::add-mask::$SONATYPE_PASSWORD"
+
+ # Import the key with loopback pinentry so Maven can sign non-interactively.
+ chmod 700 "$GNUPGHOME"
+ echo "allow-loopback-pinentry" > "$GNUPGHOME/gpg-agent.conf"
+ echo "pinentry-mode loopback" > "$GNUPGHOME/gpg.conf"
+ gpgconf --kill gpg-agent || true
+ gpg --batch --import <<< "$GPG_PRIVATE_KEY"
+ GPG_KEYNAME=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}')
+
+ # Global settings holding only the Sonatype "central" server for upload.
+ # Passed to Maven as -gs (global) so it MERGES with the CodeArtifact
+ # mirror in ~/.m2/settings.xml (user) that the mirror step wrote: deps
+ # resolve through the mirror, upload goes to central, and the mirror
+ # token stays in that user file instead of being re-passed here.
+ {
+ echo ''
+ echo "central"
+ echo "${SONATYPE_USERNAME}"
+ echo "${SONATYPE_PASSWORD}"
+ echo ''
+ } > "$MAVEN_SETTINGS"
+
+ # --- Release: build args as an array so each value is a single,
+ # properly quoted argument (no word-splitting of untrusted input). ---
+ RELEASE_ARGS=(-DreleaseVersion="$EFFECTIVE_RELEASE_VERSION")
+ if [[ -n "$DEVELOPMENT_VERSION_INPUT" ]]; then
+ RELEASE_ARGS+=(-DdevelopmentVersion="$DEVELOPMENT_VERSION_INPUT")
+ fi
+
+ # Prepare locally (no push): release commits + tag.
+ mvn release:prepare -DpushChanges=false "${RELEASE_ARGS[@]}" --file "$MODULE/pom.xml"
+
+ # perform forks a fresh build. Pass the Sonatype creds as GLOBAL
+ # settings (-gs) so the fork still auto-reads ~/.m2/settings.xml (the
+ # mirror) and merges the two.
+ mvn release:perform -DlocalCheckout=true \
+ -Darguments="-gs $MAVEN_SETTINGS -Prelease -Dgpg.keyname=$GPG_KEYNAME -Dgpg.passphrase=$GPG_PASSPHRASE" \
+ --file "$MODULE/pom.xml"
+
+ # Push commits + tag atomically, only after publish succeeded.
+ git push --atomic origin \
+ "HEAD:${GITHUB_REF_NAME}" \
+ "refs/tags/${MODULE}-${EFFECTIVE_RELEASE_VERSION}"
+
+ - name: Dry-run release (prepare only, no publish)
+ if: ${{ github.event.inputs.skip_publish == 'true' }}
+ run: |
+ RELEASE_ARGS=(-DreleaseVersion="$EFFECTIVE_RELEASE_VERSION")
+ if [[ -n "$DEVELOPMENT_VERSION_INPUT" ]]; then
+ RELEASE_ARGS+=(-DdevelopmentVersion="$DEVELOPMENT_VERSION_INPUT")
+ fi
+ mvn release:prepare -DdryRun=true "${RELEASE_ARGS[@]}" --file "$MODULE/pom.xml"
+ mvn release:clean --file "$MODULE/pom.xml" || true
+
+ # Nothing was pushed, so this only cleans the runner for a retry.
+ - name: Roll back release on failure
+ if: ${{ failure() && github.event.inputs.skip_publish != 'true' }}
+ run: |
+ mvn release:rollback --file "$MODULE/pom.xml" || true
+ mvn release:clean --file "$MODULE/pom.xml" || true
+ git tag -d "${MODULE}-${EFFECTIVE_RELEASE_VERSION}" 2>/dev/null || true
+ echo "::warning::Release failed before publish completed. The remote was not modified; the runner state has been rolled back. Safe to retry."
+
+ - name: Summary
+ if: ${{ github.event.inputs.skip_publish != 'true' }}
+ run: |
+ TAG_NAME="${MODULE}-${EFFECTIVE_RELEASE_VERSION}"
+ echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
+ echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY
+ echo "| Module | \`$MODULE\` |" >> $GITHUB_STEP_SUMMARY
+ echo "| Version | \`$EFFECTIVE_RELEASE_VERSION\` |" >> $GITHUB_STEP_SUMMARY
+ echo "| Tag | \`$TAG_NAME\` |" >> $GITHUB_STEP_SUMMARY
+ echo "| Maven Central | [com.amazonaws:$MODULE:$EFFECTIVE_RELEASE_VERSION](https://central.sonatype.com/artifact/com.amazonaws/$MODULE/$EFFECTIVE_RELEASE_VERSION) |" >> $GITHUB_STEP_SUMMARY
+
+ # Symmetry with the publish step's in-shell scrub: remove the user settings
+ # holding the CodeArtifact mirror token. Last step, after the mvn-using
+ # rollback path, so nothing still needs it. The runner is ephemeral, so
+ # this is defence-in-depth, not load-bearing.
+ - name: Scrub Maven settings
+ if: always()
+ run: rm -f "$HOME/.m2/settings.xml"
diff --git a/.github/workflows/run-integration-test.yml b/.github/workflows/run-integration-test.yml
new file mode 100644
index 000000000..35456a7c5
--- /dev/null
+++ b/.github/workflows/run-integration-test.yml
@@ -0,0 +1,139 @@
+# this workflow deploys a Lambda function that uses aws-lambda-java-log4j2,
+# invokes it, and verifies that logs arrive in CloudWatch.
+
+name: Run integration tests
+
+permissions:
+ id-token: write
+ contents: read
+
+on:
+ workflow_dispatch:
+ workflow_call:
+ push:
+ branches: [ main ]
+ paths:
+ - 'aws-lambda-java-log4j2/**'
+ - 'aws-lambda-java-core/**'
+ - 'lambda-integration-tests/**'
+
+jobs:
+ load-matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set.outputs.matrix }}
+ steps:
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+
+ - name: Load test matrix
+ id: set
+ run: |
+ MATRIX=$(jq -c '.' .github/test-matrix.json)
+ echo "matrix=${MATRIX}" >> "$GITHUB_OUTPUT"
+
+ run-integration-tests:
+ needs: load-matrix
+ # Only run on the main repo, not forks
+ if: ${{ github.repository_owner == 'aws' }}
+ runs-on: ${{ matrix.arch.runner }}
+ strategy:
+ fail-fast: false
+ matrix: ${{ fromJson(needs.load-matrix.outputs.matrix) }}
+ name: "integration-test (${{ matrix.arch.label }})"
+ concurrency:
+ group: integration-test-${{ matrix.arch.label }}
+ cancel-in-progress: false
+ steps:
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+
+ - name: Set up JDK
+ uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
+ with:
+ java-version: |
+ 8
+ 21
+ distribution: corretto
+ cache: maven
+
+ - name: Install SAM CLI
+ uses: aws-actions/setup-sam@f84ec7d548307efafe33230528756de3c5841a17 # v2
+ with:
+ use-installer: true
+
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
+ with:
+ role-to-assume: ${{ secrets.AWS_ROLE_LOG4J2_INTEG_TEST }}
+ role-session-name: GitHubActionsLog4j2IntegTest
+ aws-region: ${{ secrets.AWS_REGION_LOG4J2_INTEG_TEST }}
+
+ - name: Install core with Maven
+ run: |
+ export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
+ mvn -B install --file aws-lambda-java-core/pom.xml
+
+ - name: Install log4j2 with Maven
+ run: |
+ export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
+ mvn -B install --file aws-lambda-java-log4j2/pom.xml
+
+ - name: Build SAM stack
+ run: |
+ export JAVA_HOME=$JAVA_HOME_21_${{ matrix.arch.java_suffix }}
+ cd lambda-integration-tests && sam build
+
+ - name: Validate SAM stack
+ run: cd lambda-integration-tests && sam validate --lint
+
+ - name: Deploy stack
+ id: deploy_stack
+ env:
+ AWS_REGION: ${{ secrets.AWS_REGION_LOG4J2_INTEG_TEST }}
+ run: |
+ cd lambda-integration-tests
+ stackName="aws-lambda-java-log4j2-integ-test-${{ matrix.arch.label }}-$GITHUB_RUN_ID"
+ echo "STACK_NAME=$stackName" >> "$GITHUB_OUTPUT"
+ echo "Stack name = $stackName"
+ sam deploy \
+ --stack-name "${stackName}" \
+ --parameter-overrides "ParameterKey=LambdaRole,ParameterValue=${{ secrets.AWS_LAMBDA_ROLE_LOG4J2_INTEG_TEST }} ParameterKey=Architecture,ParameterValue=${{ matrix.arch.sam_arch }}" \
+ --no-confirm-changeset \
+ --no-progressbar \
+ --s3-bucket "${{ secrets.S3_BUCKET_LOG4J2_INTEG_TEST }}" \
+ --capabilities CAPABILITY_IAM \
+ 2>&1 | tee /tmp/sam-deploy.log | tail -n 20
+
+ # Verify stack is in a healthy state
+ STACK_STATUS=$(aws cloudformation describe-stacks \
+ --stack-name "${stackName}" \
+ --region "${AWS_REGION}" \
+ --query 'Stacks[0].StackStatus' \
+ --output text 2>&1)
+ echo "Stack status: $STACK_STATUS"
+ if [ "$STACK_STATUS" != "CREATE_COMPLETE" ] && [ "$STACK_STATUS" != "UPDATE_COMPLETE" ]; then
+ echo "FAIL: Stack is not in a healthy state (status: $STACK_STATUS)"
+ aws cloudformation describe-stack-events \
+ --stack-name "${stackName}" \
+ --region "${AWS_REGION}" \
+ --query 'StackEvents[?ResourceStatus==`CREATE_FAILED` || ResourceStatus==`UPDATE_FAILED`].[LogicalResourceId,ResourceStatusReason]' \
+ --output table 2>&1 || true
+ exit 1
+ fi
+
+ LOG4J2_TEST_FUNCTION=$(sam list stack-outputs --stack-name "${stackName}" --output json | jq -r '.[] | select(.OutputKey=="Log4j2TestFunction") | .OutputValue')
+ echo "LOG4J2_TEST_FUNCTION=$LOG4J2_TEST_FUNCTION" >> "$GITHUB_OUTPUT"
+ echo "Function name: $LOG4J2_TEST_FUNCTION"
+
+ - name: Run integration test
+ env:
+ LOG4J2_TEST_FUNCTION: ${{ steps.deploy_stack.outputs.LOG4J2_TEST_FUNCTION }}
+ AWS_REGION: ${{ secrets.AWS_REGION_LOG4J2_INTEG_TEST }}
+ run: ./lambda-integration-tests/run-tests.sh
+
+ - name: Cleanup
+ if: always() && steps.deploy_stack.outputs.STACK_NAME
+ env:
+ AWS_REGION: ${{ secrets.AWS_REGION_LOG4J2_INTEG_TEST }}
+ STACK_NAME: ${{ steps.deploy_stack.outputs.STACK_NAME }}
+ run: |
+ sam delete --stack-name "${STACK_NAME}" --no-prompts --region "${AWS_REGION}"
diff --git a/.github/workflows/runtime-interface-client_pr.yml b/.github/workflows/runtime-interface-client_pr.yml
index a0d8c6cc8..bc9e3f3eb 100644
--- a/.github/workflows/runtime-interface-client_pr.yml
+++ b/.github/workflows/runtime-interface-client_pr.yml
@@ -19,8 +19,17 @@ permissions:
jobs:
- smoke-test:
- runs-on: ubuntu-latest
+ smoke-test-arch:
+ strategy:
+ fail-fast: true
+ matrix:
+ include:
+ - arch: x86_64
+ runner: ubuntu-latest
+ - arch: aarch64
+ runner: ubuntu-24.04-arm
+ runs-on: ${{ matrix.runner }}
+ name: "smoke-test (${{ matrix.arch }})"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -39,14 +48,23 @@ jobs:
working-directory: ./aws-lambda-java-serialization
run: mvn clean install
- - name: Runtime Interface Client smoke tests - Run 'pr' target
+ - name: Runtime Interface Client smoke tests - Run 'pr-${{ matrix.arch }}' target
working-directory: ./aws-lambda-java-runtime-interface-client
- run: make pr
+ run: make pr-${{ matrix.arch }}
env:
IS_JAVA_8: true
- build:
- runs-on: ubuntu-latest
+ build-arch:
+ strategy:
+ fail-fast: true
+ matrix:
+ include:
+ - arch: x86_64
+ runner: ubuntu-latest
+ - arch: aarch64
+ runner: ubuntu-24.04-arm
+ runs-on: ${{ matrix.runner }}
+ name: "build (${{ matrix.arch }})"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -57,17 +75,11 @@ jobs:
distribution: corretto
cache: maven
- - name: Set up QEMU
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
with:
install: true
- - name: Available buildx platforms
- run: echo ${{ steps.buildx.outputs.platforms }}
-
- name: Build and install core dependency locally
working-directory: ./aws-lambda-java-core
run: mvn clean install
@@ -76,16 +88,16 @@ jobs:
working-directory: ./aws-lambda-java-serialization
run: mvn clean install
- - name: Test Runtime Interface Client xplatform build - Run 'build' target
+ - name: Test Runtime Interface Client build - Run 'build-${{ matrix.arch }}' target
working-directory: ./aws-lambda-java-runtime-interface-client
- run: make build
+ run: make build-${{ matrix.arch }}
env:
IS_JAVA_8: true
- name: Save the built jar
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
- name: aws-lambda-java-runtime-interface-client
+ name: aws-lambda-java-runtime-interface-client-${{ matrix.arch }}
path: ./aws-lambda-java-runtime-interface-client/target/aws-lambda-java-runtime-interface-client-*.jar
- name: Upload coverage to Codecov
@@ -93,3 +105,82 @@ jobs:
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+
+ integration-test-matrix:
+ runs-on: ${{ matrix.arch.runner }}
+ strategy:
+ # Run every OS/arch combination to completion so one failure doesn't mask the others.
+ fail-fast: false
+ matrix:
+ buildspec:
+ - buildspec.os.alpine.yml
+ - buildspec.os.amazoncorretto.yml
+ - buildspec.os.amazonlinux.1.yml
+ - buildspec.os.amazonlinux.2.yml
+ - buildspec.os.debian.yml
+ - buildspec.os.ubuntu.yml
+ arch:
+ - label: x64
+ runner: ubuntu-latest
+ platform: linux/amd64
+ - label: arm64
+ runner: ubuntu-24.04-arm
+ platform: linux/arm64/v8
+ exclude:
+ # Amazon Linux 1 was never published for ARM64 (x86_64 only), so
+ # public.ecr.aws/amazonlinux/amazonlinux:1 has no arm64 manifest.
+ - buildspec: buildspec.os.amazonlinux.1.yml
+ arch:
+ label: arm64
+ runner: ubuntu-24.04-arm
+ platform: linux/arm64/v8
+ name: "integration-test (${{ matrix.buildspec }} / ${{ matrix.arch.label }})"
+ steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
+ with:
+ install: true
+
+ - name: Run OS integration test - 'test-integ' target
+ working-directory: ./aws-lambda-java-runtime-interface-client
+ run: make test-integ BUILDSPEC=test/integration/codebuild/${{ matrix.buildspec }}
+ env:
+ PLATFORM_FILTER: ${{ matrix.arch.platform }}
+
+ integration-test:
+ needs: integration-test-matrix
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check integration-test results
+ run: |
+ if [ "${{ needs.integration-test-matrix.result }}" != "success" ]; then
+ echo "Integration tests failed on one or more OS/arch combinations"
+ exit 1
+ fi
+
+ smoke-test:
+ needs: smoke-test-arch
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check smoke-test results
+ run: |
+ if [ "${{ needs.smoke-test-arch.result }}" != "success" ]; then
+ echo "Smoke tests failed on one or more architectures"
+ exit 1
+ fi
+
+ build:
+ needs: build-arch
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check build results
+ run: |
+ if [ "${{ needs.build-arch.result }}" != "success" ]; then
+ echo "Build failed on one or more architectures"
+ exit 1
+ fi
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a1241783c..7e8164689 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,6 +36,25 @@ To send us a pull request, please:
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
+
+## Build Prerequisites
+
+This project uses the Maven Toolchains Plugin to pin compilation to JDK 8. If you don't have a `~/.m2/toolchains.xml` configured, builds will fail with:
+
+```
+No toolchain found for type jdk [ version='[1.8,9)' ]
+```
+
+To fix this, copy the example file to your Maven config directory and update the path:
+
+```bash
+cp toolchains.xml.example ~/.m2/toolchains.xml
+```
+
+Then edit `~/.m2/toolchains.xml` and set `` to your local JDK 8 installation path.
+
+Note: if you use `actions/setup-java` in CI (as our GitHub Actions workflows do), this file is generated automatically.
+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
diff --git a/aws-lambda-java-core/pom.xml b/aws-lambda-java-core/pom.xml
index cca9d0cdf..f45b32fb6 100644
--- a/aws-lambda-java-core/pom.xml
+++ b/aws-lambda-java-core/pom.xml
@@ -5,7 +5,7 @@
com.amazonaws
aws-lambda-java-core
- 1.4.0
+ 1.4.0-SNAPSHOT
jar
AWS Lambda Java Core Library
@@ -22,6 +22,9 @@
https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ HEAD
@@ -36,6 +39,43 @@
1.8
+
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 3.1.1
+
+ aws-lambda-java-core-@{project.version}
+ true
+ release
+ deploy
+
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.2.0
+
+
+
+
+ [1.8,9)
+
+
+
+
+
+
+ toolchain
+
+
+
+
+
+
+
dev
@@ -114,6 +154,7 @@
true
central
+ false
diff --git a/aws-lambda-java-events-sdk-transformer/pom.xml b/aws-lambda-java-events-sdk-transformer/pom.xml
index 6de599ef7..f66020068 100644
--- a/aws-lambda-java-events-sdk-transformer/pom.xml
+++ b/aws-lambda-java-events-sdk-transformer/pom.xml
@@ -5,7 +5,7 @@
com.amazonaws
aws-lambda-java-events-sdk-transformer
- 3.1.1
+ 3.1.1-SNAPSHOT
jar
AWS Lambda Java Events SDK Transformer Library
@@ -24,6 +24,9 @@
https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ HEAD
@@ -79,6 +82,38 @@
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 3.1.1
+
+ aws-lambda-java-events-sdk-transformer-@{project.version}
+ true
+ release
+ deploy
+
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.2.0
+
+
+
+
+ [1.8,9)
+
+
+
+
+
+
+ toolchain
+
+
+
+
maven-surefire-plugin
${maven-surefire-plugin.version}
@@ -171,6 +206,7 @@
true
central
+ false
diff --git a/aws-lambda-java-events/pom.xml b/aws-lambda-java-events/pom.xml
index c8c40e0c7..0b69b03e6 100644
--- a/aws-lambda-java-events/pom.xml
+++ b/aws-lambda-java-events/pom.xml
@@ -5,7 +5,7 @@
com.amazonaws
aws-lambda-java-events
- 3.16.1
+ 3.16.1-SNAPSHOT
jar
AWS Lambda Java Events Library
@@ -22,6 +22,9 @@
https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ HEAD
@@ -42,6 +45,43 @@
5.12.2
+
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.2.0
+
+
+
+
+ [1.8,9)
+
+
+
+
+
+
+ toolchain
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 3.1.1
+
+ aws-lambda-java-events-@{project.version}
+ true
+ release
+ deploy
+
+
+
+
+
sonatype-nexus-staging
@@ -161,6 +201,7 @@
true
central
+ false
diff --git a/aws-lambda-java-log4j2/README.md b/aws-lambda-java-log4j2/README.md
index 480df21df..b906ee8f6 100644
--- a/aws-lambda-java-log4j2/README.md
+++ b/aws-lambda-java-log4j2/README.md
@@ -1,5 +1,7 @@
# Using log4j2 with AWS Lambda
+**IMPORTANT: The v1.6.3 release contained a regression (see [#612](https://github.com/aws/aws-lambda-java-libs/issues/612)) resulting in missing logs. Please upgrade to v1.6.4 or later. We apologize for the inconvenience.**
+
### 1. Pull in log4j2 dependencies
Example for Maven pom.xml
@@ -10,22 +12,22 @@ Example for Maven pom.xml
com.amazonaws
aws-lambda-java-log4j2
- 1.6.4
+ 1.6.5
org.apache.logging.log4j
log4j-core
- 2.25.4
+ 2.25.5
org.apache.logging.log4j
log4j-api
- 2.25.4
+ 2.25.5
org.apache.logging.log4j
log4j-layout-template-json
- 2.25.4
+ 2.25.5
....
@@ -73,7 +75,7 @@ If you are using the [John Rengelman](https://github.com/johnrengelman/shadow) G
dependencies{
...
- implementation group: 'com.amazonaws', name: 'aws-lambda-java-log4j2', version: '1.6.4'
+ implementation group: 'com.amazonaws', name: 'aws-lambda-java-log4j2', version: '1.6.5'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4jVersion
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4jVersion
}
diff --git a/aws-lambda-java-log4j2/RELEASE.CHANGELOG.md b/aws-lambda-java-log4j2/RELEASE.CHANGELOG.md
index 5f43862a3..37e7a8760 100644
--- a/aws-lambda-java-log4j2/RELEASE.CHANGELOG.md
+++ b/aws-lambda-java-log4j2/RELEASE.CHANGELOG.md
@@ -1,4 +1,7 @@
### May 19, 2026
+`1.6.5`:
+- Updated `log4j-core` and `log4j-api` dependencies to `2.25.5`
+
`1.6.4`:
- Fix regression in `1.6.3`
diff --git a/aws-lambda-java-log4j2/pom.xml b/aws-lambda-java-log4j2/pom.xml
index 6f142d57c..d136612f7 100644
--- a/aws-lambda-java-log4j2/pom.xml
+++ b/aws-lambda-java-log4j2/pom.xml
@@ -5,7 +5,7 @@
com.amazonaws
aws-lambda-java-log4j2
- 1.6.4
+ 1.6.4-SNAPSHOT
jar
AWS Lambda Java Log4j 2.x Libraries
@@ -22,6 +22,9 @@
https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ HEAD
@@ -34,7 +37,8 @@
1.8
1.8
- 2.25.4
+ 2.25.5
+ 5.12.2
@@ -60,8 +64,61 @@
log4j-api
${log4j.version}
+
+ org.apache.logging.log4j
+ log4j-layout-template-json
+ ${log4j.version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ ${junit-jupiter.version}
+ test
+
+
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 3.1.1
+
+ aws-lambda-java-log4j2-@{project.version}
+ true
+ release
+ deploy
+
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.2.0
+
+
+
+
+ [1.8,9)
+
+
+
+
+
+
+ toolchain
+
+
+
+
+
+ maven-surefire-plugin
+ 3.5.2
+
+
+
+
dev
@@ -140,10 +197,11 @@
true
central
+ false
-
\ No newline at end of file
+
diff --git a/aws-lambda-java-log4j2/src/test/java/com/amazonaws/services/lambda/runtime/log4j2/LambdaAppenderPluginTest.java b/aws-lambda-java-log4j2/src/test/java/com/amazonaws/services/lambda/runtime/log4j2/LambdaAppenderPluginTest.java
new file mode 100644
index 000000000..0bcd057a6
--- /dev/null
+++ b/aws-lambda-java-log4j2/src/test/java/com/amazonaws/services/lambda/runtime/log4j2/LambdaAppenderPluginTest.java
@@ -0,0 +1,86 @@
+/* Copyright 2026 Amazon.com, Inc. or its affiliates. All Rights Reserved. */
+
+package com.amazonaws.services.lambda.runtime.log4j2;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class LambdaAppenderPluginTest {
+
+ private final PrintStream originalOut = System.out;
+ private ByteArrayOutputStream captured;
+
+ @BeforeEach
+ void redirectStdout() throws UnsupportedEncodingException {
+ captured = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(captured, true, StandardCharsets.UTF_8.name()));
+ }
+
+ @AfterEach
+ void restoreStdout() {
+ System.setOut(originalOut);
+ }
+
+ @Test
+ void lambdaAppenderEmitsLogsAtVariousLevels() throws UnsupportedEncodingException {
+ Logger logger = LogManager.getLogger(LambdaAppenderPluginTest.class);
+
+ logger.debug("debug-msg");
+ logger.info("info-msg");
+ logger.warn("warn-msg");
+ logger.error("error-msg");
+
+ String output = captured.toString(StandardCharsets.UTF_8.name());
+
+ // The PatternLayout in src/test/resources/log4j2.xml is "%-5p %c{1} - %m%n",
+ // so each event should appear as " LambdaAppenderPluginTest - ".
+ assertTrue(output.contains("DEBUG LambdaAppenderPluginTest - debug-msg"),
+ "expected DEBUG line in output but got:\n" + output);
+ assertTrue(output.contains("INFO LambdaAppenderPluginTest - info-msg"),
+ "expected INFO line in output but got:\n" + output);
+ assertTrue(output.contains("WARN LambdaAppenderPluginTest - warn-msg"),
+ "expected WARN line in output but got:\n" + output);
+ assertTrue(output.contains("ERROR LambdaAppenderPluginTest - error-msg"),
+ "expected ERROR line in output but got:\n" + output);
+
+ // Sanity check: log4j should not have fallen back to its default
+ // ConsoleAppender / status logger error message.
+ assertFalse(output.contains("ERROR StatusLogger"),
+ "log4j status logger reported an error, output was:\n" + output);
+ }
+
+ @Test
+ void lambdaAppenderEmitsJsonForJsonFormatLogger() throws UnsupportedEncodingException {
+ // The "json-test" logger is configured in src/test/resources/log4j2.xml
+ // with additivity=false to a second LambdaAppender using format="JSON"
+ // and JsonTemplateLayout backed by LambdaLayout.json.
+ Logger logger = LogManager.getLogger("json-test");
+
+ logger.info("json-info-msg");
+ logger.error("json-error-msg");
+
+ String output = captured.toString(StandardCharsets.UTF_8.name());
+
+ assertTrue(output.contains("json-info-msg"),
+ "expected json-info-msg in output but got:\n" + output);
+ assertTrue(output.contains("json-error-msg"),
+ "expected json-error-msg in output but got:\n" + output);
+
+ // Output should look like JSON, not the text PatternLayout from the
+ // root logger — so it must contain JSON field punctuation around the
+ // message rather than the "INFO json-test - ..." text pattern.
+ assertTrue(output.contains("\"message\":\"json-info-msg\""),
+ "expected JSON-encoded message field but got:\n" + output);
+ }
+}
diff --git a/aws-lambda-java-log4j2/src/test/resources/log4j2.xml b/aws-lambda-java-log4j2/src/test/resources/log4j2.xml
new file mode 100644
index 000000000..7b43094e2
--- /dev/null
+++ b/aws-lambda-java-log4j2/src/test/resources/log4j2.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ %-5p %c{1} - %m%n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/aws-lambda-java-runtime-interface-client/.gitignore b/aws-lambda-java-runtime-interface-client/.gitignore
index b1e77deb4..f6064106d 100644
--- a/aws-lambda-java-runtime-interface-client/.gitignore
+++ b/aws-lambda-java-runtime-interface-client/.gitignore
@@ -1,2 +1,5 @@
compile-flags.txt
ric-dev-environment/codeartifact-properties.mk
+
+# aws-lambda-cpp prebuilt lib + headers, fetched and staged at build time
+src/main/jni/deps/aws-lambda-cpp/
diff --git a/aws-lambda-java-runtime-interface-client/Makefile b/aws-lambda-java-runtime-interface-client/Makefile
index 6c3a268fb..770671c07 100644
--- a/aws-lambda-java-runtime-interface-client/Makefile
+++ b/aws-lambda-java-runtime-interface-client/Makefile
@@ -26,20 +26,34 @@ test:
.PHONY: setup-codebuild-agent
setup-codebuild-agent:
- docker build -t codebuild-agent \
+ test/integration/codebuild-local/docker-retry.sh docker build --load -t codebuild-agent \
--build-arg ARCHITECTURE=$(ARCHITECTURE_ALIAS) \
- - < test/integration/codebuild-local/Dockerfile.agent
+ -f test/integration/codebuild-local/Dockerfile.agent \
+ test/integration/codebuild-local
+# Smoke tests are split per-architecture so CI can run each set on a native
+# runner. Running the linux/arm64/v8 combos under QEMU on an x86_64 host makes
+# `mvn install` recompile curl for aarch64 emulated, which takes ~30 minutes.
.PHONY: test-smoke
-test-smoke: setup-codebuild-agent
+test-smoke: test-smoke-x86_64 test-smoke-aarch64
+
+.PHONY: test-smoke-x86_64
+test-smoke-x86_64: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/amd64
- CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/arm64/v8
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11 linux/amd64
+
+.PHONY: test-smoke-aarch64
+test-smoke-aarch64: setup-codebuild-agent
+ CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/arm64/v8
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11 linux/arm64/v8
+# BUILDSPEC can point to the buildspec directory (default, runs every OS) or to a
+# single buildspec file, which is how CI parallelizes the run across OSes.
+BUILDSPEC ?= test/integration/codebuild
+
.PHONY: test-integ
test-integ: setup-codebuild-agent
- CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_all.sh test/integration/codebuild
+ CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_all.sh $(BUILDSPEC)
# Command to run everytime you make changes to verify everything works
.PHONY: dev
@@ -49,11 +63,25 @@ dev: test
.PHONY: pr
pr: test test-smoke
+# Per-architecture PR checks so CI can run each on a native runner (no QEMU).
+.PHONY: pr-x86_64
+pr-x86_64: test test-smoke-x86_64
+
+.PHONY: pr-aarch64
+pr-aarch64: test test-smoke-aarch64
+
.PHONY: build
-build:
- mvn clean install $(EXTRA_LOAD_ARG)
+build: build-x86_64 build-aarch64
+
+.PHONY: build-x86_64
+build-x86_64:
+ mvn clean install -DmultiArch=false $(EXTRA_LOAD_ARG)
mvn install -P linux-x86_64 $(EXTRA_LOAD_ARG)
mvn install -P linux_musl-x86_64 $(EXTRA_LOAD_ARG)
+
+.PHONY: build-aarch64
+build-aarch64:
+ mvn clean install -DmultiArch=false $(EXTRA_LOAD_ARG)
mvn install -P linux-aarch64 $(EXTRA_LOAD_ARG)
mvn install -P linux_musl-aarch64 $(EXTRA_LOAD_ARG)
diff --git a/aws-lambda-java-runtime-interface-client/README.md b/aws-lambda-java-runtime-interface-client/README.md
index b72a6238c..a49bf87b4 100644
--- a/aws-lambda-java-runtime-interface-client/README.md
+++ b/aws-lambda-java-runtime-interface-client/README.md
@@ -11,7 +11,7 @@ You can include this package in your preferred base image to make that base imag
### Creating a Docker Image for Lambda with the Runtime Interface Client
-Choose a preferred base image. The Runtime Interface Client is tested on Amazon Linux, Alpine, Ubuntu, Debian, and CentOS. The requirements are that the image is:
+Choose a preferred base image. The Runtime Interface Client is tested on Amazon Linux, Alpine, Ubuntu, and Debian. The requirements are that the image is:
* built for x86_64 and ARM64
* contains Java >= 8
diff --git a/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md b/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md
index 2391045fc..97d177034 100644
--- a/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md
+++ b/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md
@@ -1,3 +1,7 @@
+### July 17, 2026
+`2.12.0`
+- Add `Lambda-Runtime-Invocation-Id` header support for cross-wiring protection. The RIC now echoes the invocation ID received from RAPID on `/next` back on `/response` and `/error`, enabling RAPID to detect and reject stale responses from timed-out invocations.
+
### May 13, 2026
`2.11.0`
- Update aws-lambda-java-serialization dependency to 1.4.1
diff --git a/aws-lambda-java-runtime-interface-client/pom.xml b/aws-lambda-java-runtime-interface-client/pom.xml
index 2ba71c43c..6db41aa36 100644
--- a/aws-lambda-java-runtime-interface-client/pom.xml
+++ b/aws-lambda-java-runtime-interface-client/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.amazonaws
aws-lambda-java-runtime-interface-client
- 2.11.0
+ 2.12.0-SNAPSHOT
jar
AWS Lambda Java Runtime Interface Client
@@ -21,6 +21,9 @@
https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ scm:git:https://github.com/aws/aws-lambda-java-libs.git
+ HEAD
@@ -115,6 +118,38 @@
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 3.1.1
+
+ aws-lambda-java-runtime-interface-client-@{project.version}
+ true
+ release
+ deploy
+
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.2.0
+
+
+
+
+ [1.8,9)
+
+
+
+
+
+
+ toolchain
+
+
+
+
maven-install-plugin
org.apache.maven.plugins
@@ -381,6 +416,7 @@
true
central
+ false
diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java
index e5b221a80..b9aa0fd11 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java
+++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java
@@ -315,7 +315,7 @@ private static void startRuntimeLoop(LambdaRequestHandler lambdaRequestHandler,
try {
ByteArrayOutputStream payload = lambdaRequestHandler.call(request);
- runtimeClient.reportInvocationSuccess(request.getId(), payload.toByteArray());
+ runtimeClient.reportInvocationSuccess(request.getId(), payload.toByteArray(), request.getInvocationId());
// clear interrupted flag in case if it was set by user's code
Thread.interrupted();
} catch (Throwable t) {
@@ -323,7 +323,7 @@ private static void startRuntimeLoop(LambdaRequestHandler lambdaRequestHandler,
userFault = UserFault.makeUserFault(t);
shouldExit = exitLoopOnErrors && (t instanceof VirtualMachineError || t instanceof IOError || userFault.fatal);
LambdaError error = createLambdaErrorFromThrowableOrUserFault(t);
- runtimeClient.reportInvocationError(request.getId(), error);
+ runtimeClient.reportInvocationError(request.getId(), error, request.getInvocationId());
} finally {
if (userFault != null) {
lambdaLogger.log(userFault.reportableError(), lambdaLogger.getLogFormat() == LogFormat.JSON ? LogLevel.ERROR : LogLevel.UNDEFINED);
diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClient.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClient.java
index a62aeb9b8..042bd2579 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClient.java
+++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClient.java
@@ -34,15 +34,17 @@ public interface LambdaRuntimeApiClient {
* Report invocation success
* @param requestId request id
* @param response byte array representing response
+ * @param invocationId invocation id for cross-wiring protection (may be null)
*/
- void reportInvocationSuccess(String requestId, byte[] response) throws IOException;
+ void reportInvocationSuccess(String requestId, byte[] response, String invocationId) throws IOException;
/**
* Report invocation error
* @param requestId request id
* @param error error to report
+ * @param invocationId invocation id for cross-wiring protection (may be null)
*/
- void reportInvocationError(String requestId, LambdaError error) throws IOException;
+ void reportInvocationError(String requestId, LambdaError error, String invocationId) throws IOException;
/**
* SnapStart endpoint to report that beforeCheckoint hooks were executed
diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClientImpl.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClientImpl.java
index caca69aa7..fce12eade 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClientImpl.java
+++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeApiClientImpl.java
@@ -34,6 +34,7 @@ public class LambdaRuntimeApiClientImpl implements LambdaRuntimeApiClient {
private static final String DEFAULT_CONTENT_TYPE = "application/json";
private static final String XRAY_ERROR_CAUSE_HEADER = "Lambda-Runtime-Function-XRay-Error-Cause";
private static final String ERROR_TYPE_HEADER = "Lambda-Runtime-Function-Error-Type";
+ private static final String INVOCATION_ID_HEADER = "Lambda-Runtime-Invocation-Id";
// 1MiB
private static final int XRAY_ERROR_CAUSE_MAX_HEADER_SIZE = 1024 * 1024;
@@ -55,7 +56,7 @@ public LambdaRuntimeApiClientImpl(String hostnameAndPort) {
@Override
public void reportInitError(LambdaError error) throws IOException {
String endpoint = this.baseUrl + "/2018-06-01/runtime/init/error";
- reportLambdaError(endpoint, error, XRAY_ERROR_CAUSE_MAX_HEADER_SIZE);
+ reportLambdaError(endpoint, error, XRAY_ERROR_CAUSE_MAX_HEADER_SIZE, null);
}
@Override
@@ -123,14 +124,15 @@ public InvocationRequest nextInvocationWithExponentialBackoff(LambdaContextLogge
}
@Override
- public void reportInvocationSuccess(String requestId, byte[] response) {
- NativeClient.postInvocationResponse(requestId.getBytes(UTF_8), response);
+ public void reportInvocationSuccess(String requestId, byte[] response, String invocationId) {
+ byte[] invocationIdBytes = invocationId != null ? invocationId.getBytes(UTF_8) : null;
+ NativeClient.postInvocationResponse(requestId.getBytes(UTF_8), response, invocationIdBytes);
}
@Override
- public void reportInvocationError(String requestId, LambdaError error) throws IOException {
+ public void reportInvocationError(String requestId, LambdaError error, String invocationId) throws IOException {
String endpoint = invocationEndpoint + requestId + "/error";
- reportLambdaError(endpoint, error, XRAY_ERROR_CAUSE_MAX_HEADER_SIZE);
+ reportLambdaError(endpoint, error, XRAY_ERROR_CAUSE_MAX_HEADER_SIZE, invocationId);
}
@Override
@@ -145,13 +147,17 @@ public void restoreNext() throws IOException {
@Override
public void reportRestoreError(LambdaError error) throws IOException {
String endpoint = this.baseUrl + "/2018-06-01/runtime/restore/error";
- reportLambdaError(endpoint, error, XRAY_ERROR_CAUSE_MAX_HEADER_SIZE);
+ reportLambdaError(endpoint, error, XRAY_ERROR_CAUSE_MAX_HEADER_SIZE, null);
}
- void reportLambdaError(String endpoint, LambdaError error, int maxXrayHeaderSize) throws IOException {
+ void reportLambdaError(String endpoint, LambdaError error, int maxXrayHeaderSize, String invocationId) throws IOException {
Map headers = new HashMap<>();
headers.put(ERROR_TYPE_HEADER, error.errorType.getRapidError());
+ if (invocationId != null) {
+ headers.put(INVOCATION_ID_HEADER, invocationId);
+ }
+
if (error.xRayErrorCause != null) {
byte[] xRayErrorCauseJson = DtoSerializers.serialize(error.xRayErrorCause);
if (xRayErrorCauseJson != null && xRayErrorCauseJson.length < maxXrayHeaderSize) {
diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java
index 101aea4d0..5c690814b 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java
+++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java
@@ -21,6 +21,6 @@ static void init(String awsLambdaRuntimeApi) {
static native InvocationRequest next();
- static native void postInvocationResponse(byte[] requestId, byte[] response);
+ static native void postInvocationResponse(byte[] requestId, byte[] response, byte[] invocationId);
}
diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/dto/InvocationRequest.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/dto/InvocationRequest.java
index 656945b41..a589cb024 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/dto/InvocationRequest.java
+++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/dto/InvocationRequest.java
@@ -45,6 +45,11 @@ public class InvocationRequest {
*/
private String tenantId;
+ /**
+ * The invocation ID for cross-wiring protection.
+ */
+ private String invocationId;
+
private byte[] content;
public String getId() {
@@ -107,6 +112,14 @@ public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
+ public String getInvocationId() {
+ return invocationId;
+ }
+
+ public void setInvocationId(String invocationId) {
+ this.invocationId = invocationId;
+ }
+
public byte[] getContent() {
return content;
}
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc
index 1cfcfbb1d..ab6f83b69 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc
+++ b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc
@@ -1,9 +1,12 @@
-FROM public.ecr.aws/amazonlinux/amazonlinux:2
+ARG BASE_REGISTRY=public.ecr.aws
+FROM ${BASE_REGISTRY}/amazonlinux/amazonlinux:2
ARG CURL_VERSION
+ARG AWS_REGION
+
+RUN if [ -n "${AWS_REGION}" ]; then echo "${AWS_REGION}" > /etc/yum/vars/awsregion; fi
RUN yum install -y \
- cmake3 \
tar \
gzip \
make \
@@ -29,18 +32,12 @@ RUN ./configure \
make && \
make install
-# Install aws-lambda-cpp dependency
-ADD ./deps/aws-lambda-cpp-* /src/deps/aws-lambda-cpp
-RUN mkdir -p /src/deps/aws-lambda-cpp/build
-WORKDIR /src/deps/aws-lambda-cpp/build
-RUN cmake3 .. \
- -DENABLE_LTO=OFF \
- -DCMAKE_CXX_FLAGS="-fPIC -DBACKWARD_SYSTEM_UNKNOWN" \
- -DCMAKE_CXX_STANDARD=11 \
- -DCMAKE_INSTALL_PREFIX=$(pwd)/../../artifacts \
- -DCMAKE_MODULE_PATH=$(pwd)/../../artifacts/lib/pkgconfig && \
- make && \
- make install
+# Install prebuilt aws-lambda-cpp dependency. The static library and headers
+# were fetched and GPG-verified on the host by build-jni-lib.sh; here we only
+# COPY them into the artifacts tree the native client links against (the build
+# container never reaches the network).
+COPY ./deps/aws-lambda-cpp/include /src/deps/artifacts/include
+COPY ./deps/aws-lambda-cpp/lib/libaws-lambda-runtime.a /src/deps/artifacts/lib/
# Build native client
ADD *.cpp *.h /src/
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl
index 64725c140..fa5b98173 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl
+++ b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl
@@ -1,11 +1,11 @@
-FROM public.ecr.aws/docker/library/alpine:3
+ARG BASE_REGISTRY=public.ecr.aws
+FROM ${BASE_REGISTRY}/docker/library/alpine:3
ARG CURL_VERSION
RUN apk update && \
apk add \
openjdk11 \
- cmake \
file \
g++ \
gcc \
@@ -30,17 +30,8 @@ RUN ./configure \
make && \
make install
-# Install aws-lambda-cpp dependency
-ADD ./deps/aws-lambda-cpp-* /src/deps/aws-lambda-cpp
-RUN mkdir -p /src/deps/aws-lambda-cpp/build
-WORKDIR /src/deps/aws-lambda-cpp/build
-RUN cmake .. \
- -DCMAKE_CXX_FLAGS="-fPIC -DBACKWARD_SYSTEM_UNKNOWN" \
- -DCMAKE_CXX_STANDARD=11 \
- -DCMAKE_INSTALL_PREFIX=$(pwd)/../../artifacts\
- -DCMAKE_MODULE_PATH=$(pwd)/../../artifacts/lib/pkgconfig && \
- make && \
- make install
+COPY ./deps/aws-lambda-cpp/include /src/deps/artifacts/include
+COPY ./deps/aws-lambda-cpp/lib/libaws-lambda-runtime.a /src/deps/artifacts/lib/
# Build native client
ADD *.cpp *.h /src/
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh
index b7dbb5a80..28263531b 100755
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh
+++ b/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh
@@ -10,6 +10,66 @@ BUILD_OS=${3}
BUILD_ARCH=${4}
CURL_VERSION=7.83.1
+BASE_REGISTRY="${BASE_REGISTRY:-public.ecr.aws}"
+AWS_REGION="${AWS_REGION:-${AWS_DEFAULT_REGION:-}}"
+
+# aws-lambda-cpp is consumed as the prebuilt static library published on the
+# upstream GitHub release rather than being compiled from a vendored source
+# tree. We fetch and GPG-verify it
+ALC_VERSION="1.0.1"
+ALC_TAG="v${ALC_VERSION}"
+ALC_REPO_URL="https://github.com/awslabs/aws-lambda-cpp"
+ALC_RELEASE_URL="${ALC_REPO_URL}/releases/download/${ALC_TAG}"
+ALC_SIGNING_KEY_URL="https://raw.githubusercontent.com/awslabs/aws-lambda-cpp/${ALC_TAG}/signing-public-key.asc"
+ALC_STAGE_DIR="${SRC_DIR}/deps/aws-lambda-cpp"
+
+function fetch_aws_lambda_cpp() {
+ arch=$1
+
+ release_arch="${arch/aarch_64/aarch64}"
+
+ if [ -f "${ALC_STAGE_DIR}/.staged-arch" ] && \
+ [ "$(cat "${ALC_STAGE_DIR}/.staged-arch")" == "${release_arch}" ]; then
+ echo "aws-lambda-cpp ${ALC_VERSION} (${release_arch}) already staged, skipping fetch"
+ return
+ fi
+
+ echo "Fetching prebuilt aws-lambda-cpp ${ALC_VERSION} for ${release_arch}"
+ rm -rf "${ALC_STAGE_DIR}"
+ mkdir -p "${ALC_STAGE_DIR}/lib" "${ALC_STAGE_DIR}/include"
+
+ local workdir
+ workdir=$(mktemp -d)
+ local lib_asset="libaws-lambda-runtime-${release_arch}.a"
+
+ curl -fsSL -o "${workdir}/${lib_asset}" "${ALC_RELEASE_URL}/${lib_asset}"
+ curl -fsSL -o "${workdir}/${lib_asset}.asc" "${ALC_RELEASE_URL}/${lib_asset}.asc"
+ curl -fsSL -o "${workdir}/SHA256SUMS" "${ALC_RELEASE_URL}/SHA256SUMS"
+ curl -fsSL -o "${workdir}/SHA256SUMS.asc" "${ALC_RELEASE_URL}/SHA256SUMS.asc"
+ curl -fsSL -o "${workdir}/signing-key.asc" "${ALC_SIGNING_KEY_URL}"
+
+ local gnupghome
+ gnupghome=$(mktemp -d)
+ gpg --homedir "${gnupghome}" --batch --quiet --import "${workdir}/signing-key.asc"
+ gpg --homedir "${gnupghome}" --batch --verify "${workdir}/${lib_asset}.asc" "${workdir}/${lib_asset}"
+ gpg --homedir "${gnupghome}" --batch --verify "${workdir}/SHA256SUMS.asc" "${workdir}/SHA256SUMS"
+ rm -rf "${gnupghome}"
+
+ # Cross-check the checksum too (defence in depth; SHA256SUMS is itself signed).
+ ( cd "${workdir}" && grep "${lib_asset}\$" SHA256SUMS | sha256sum -c - )
+
+ cp "${workdir}/${lib_asset}" "${ALC_STAGE_DIR}/lib/libaws-lambda-runtime.a"
+
+ # Headers aren't a release asset, so take them from the source at the same
+ # tag. They are declarations only -- every symbol lives in the prebuilt lib.
+ curl -fsSL -o "${workdir}/src.tar.gz" "${ALC_REPO_URL}/archive/refs/tags/${ALC_TAG}.tar.gz"
+ tar -xzf "${workdir}/src.tar.gz" -C "${workdir}" "aws-lambda-cpp-${ALC_VERSION}/include"
+ cp -R "${workdir}/aws-lambda-cpp-${ALC_VERSION}/include/." "${ALC_STAGE_DIR}/include/"
+
+ echo "${release_arch}" > "${ALC_STAGE_DIR}/.staged-arch"
+ rm -rf "${workdir}"
+}
+
function get_docker_platform() {
arch=$1
@@ -39,13 +99,15 @@ function build_for_libc_arch() {
arch=$2
artifact=$3
+ fetch_aws_lambda_cpp "${arch}"
+
docker_platform=$(get_docker_platform ${arch})
echo "Compiling the native library with libc implementation \`${libc_impl}\` on architecture \`${arch}\` using Docker platform \`${docker_platform}\`"
if [[ "${MULTI_ARCH}" == "true" ]]; then
docker build --platform="${docker_platform}" -f "${SRC_DIR}/Dockerfile.${libc_impl}" \
- --build-arg CURL_VERSION=${CURL_VERSION} "${SRC_DIR}" -o - \
+ --build-arg CURL_VERSION=${CURL_VERSION} --build-arg BASE_REGISTRY=${BASE_REGISTRY} --build-arg AWS_REGION=${AWS_REGION} "${SRC_DIR}" -o - \
| tar -xOf - src/aws-lambda-runtime-interface-client.so > "${artifact}"
else
echo "multi-arch not requested, assuming this is a workaround to goofyness when docker buildx is enabled on Linux CI environments."
@@ -63,7 +125,7 @@ function build_for_libc_arch() {
docker build --platform="${docker_platform}" \
-t "${image_name}" \
-f "${SRC_DIR}/Dockerfile.${libc_impl}" \
- --build-arg CURL_VERSION=${CURL_VERSION} "${SRC_DIR}" ${EXTRA_LOAD_ARG}
+ --build-arg CURL_VERSION=${CURL_VERSION} --build-arg BASE_REGISTRY=${BASE_REGISTRY} --build-arg AWS_REGION=${AWS_REGION} "${SRC_DIR}" ${EXTRA_LOAD_ARG}
echo "Docker image has been successfully built"
@@ -113,10 +175,15 @@ else
declare -a ARCHITECTURES=("x86_64" "aarch_64")
declare -a LIBC_IMPLS=("glibc" "musl")
+ host_arch="$(arch)"
+ case "${host_arch}" in
+ aarch64|arm64) host_arch="aarch_64" ;;
+ esac
+
for arch in "${ARCHITECTURES[@]}"; do
- if [[ "${MULTI_ARCH}" != "true" ]] && [[ "$(arch)" != "${arch}" ]]; then
- echo "multi arch build not requested and host arch is $(arch), so skipping ${arch}..."
+ if [[ "${MULTI_ARCH}" != "true" ]] && [[ "${host_arch}" != "${arch}" ]]; then
+ echo "multi arch build not requested and host arch is ${host_arch}, so skipping ${arch}..."
continue
fi
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp
index f06796616..fb6cd3ca3 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp
+++ b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp
@@ -21,6 +21,7 @@ static jfieldID clientContextField;
static jfieldID cognitoIdentityField;
static jfieldID xrayTraceIdField;
static jfieldID tenantIdField;
+static jfieldID invocationIdField;
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
@@ -43,6 +44,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
clientContextField = env->GetFieldID(invocationRequestClass , "clientContext", "Ljava/lang/String;");
cognitoIdentityField = env->GetFieldID(invocationRequestClass , "cognitoIdentity", "Ljava/lang/String;");
tenantIdField = env->GetFieldID(invocationRequestClass, "tenantId", "Ljava/lang/String;");
+ invocationIdField = env->GetFieldID(invocationRequestClass, "invocationId", "Ljava/lang/String;");
return JNI_VERSION;
}
@@ -112,6 +114,10 @@ JNIEXPORT jobject JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_
CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, tenantIdField, env->NewStringUTF(response.tenant_id.c_str())));
}
+ if(response.invocation_id != ""){
+ CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, invocationIdField, env->NewStringUTF(response.invocation_id.c_str())));
+ }
+
bytes = reinterpret_cast(response.payload.c_str());
CHECK_EXCEPTION(env, jArray = env->NewByteArray(response.payload.length()));
CHECK_EXCEPTION(env, env->SetByteArrayRegion(jArray, 0, response.payload.length(), bytes));
@@ -124,7 +130,7 @@ JNIEXPORT jobject JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_
}
JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_postInvocationResponse
- (JNIEnv *env, jobject thisObject, jbyteArray jrequestId, jbyteArray jresponseArray) {
+ (JNIEnv *env, jobject thisObject, jbyteArray jrequestId, jbyteArray jresponseArray, jbyteArray jinvocationId) {
std::string payload = toNativeString(env, jresponseArray);
if ((env)->ExceptionOccurred()){
return;
@@ -134,8 +140,16 @@ JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_run
return;
}
+ std::string invocationId;
+ if (jinvocationId != nullptr) {
+ invocationId = toNativeString(env, jinvocationId);
+ if ((env)->ExceptionOccurred()){
+ return;
+ }
+ }
+
auto response = aws::lambda_runtime::invocation_response::success(payload, "application/json");
- auto outcome = CLIENT->post_success(requestId, response);
+ auto outcome = CLIENT->post_success(requestId, response, invocationId);
if (!outcome.is_success()) {
std::string errorMessage("Failed to post invocation response.");
throwLambdaRuntimeClientException(env, errorMessage, outcome.get_failure());
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h
index 7219109b0..0f1aaa2ca 100644
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h
+++ b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h
@@ -17,7 +17,7 @@ JNIEXPORT jobject JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_
(JNIEnv *, jobject);
JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_postInvocationResponse
- (JNIEnv *, jobject, jbyteArray, jbyteArray);
+ (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray);
#ifdef __cplusplus
}
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format
deleted file mode 100644
index ec8bb67d4..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format
+++ /dev/null
@@ -1,61 +0,0 @@
----
-Language: Cpp
-# BasedOnStyle: Mozilla
-AlignAfterOpenBracket: AlwaysBreak
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlines: Right
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: false
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: Inline
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: true
-BinPackArguments: false
-BinPackParameters: false
-BreakBeforeBinaryOperators: None
-BreakBeforeTernaryOperators: true
-BreakStringLiterals: true
-ColumnLimit: 120
-ContinuationIndentWidth: 4
-DerivePointerAlignment: false
-IncludeBlocks: Preserve
-IndentCaseLabels: true
-IndentPPDirectives: AfterHash
-IndentWidth: 4
-IndentWrappedFunctionNames: true
-KeepEmptyLinesAtTheStartOfBlocks: true
-MacroBlockBegin: ''
-MacroBlockEnd: ''
-MaxEmptyLinesToKeep: 1
-PenaltyBreakComment: 10
-PenaltyBreakAssignment: 20
-PenaltyBreakString: 30
-PenaltyBreakBeforeFirstCallParameter: 35
-PenaltyBreakFirstLessLess: 40
-PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 100000
-PointerAlignment: Left
-ReflowComments: true
-SortIncludes: false
-SpaceAfterCStyleCast: false
-SpaceBeforeAssignmentOperators: true
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: false
-SpacesInContainerLiterals: true
-SpacesInCStyleCastParentheses: false
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-Standard: Cpp11
-TabWidth: 4
-UseTab: Never
-NamespaceIndentation: None
-BreakBeforeBraces: Stroustrup
-AccessModifierOffset: -4
-...
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy
deleted file mode 100644
index 7d343ead8..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy
+++ /dev/null
@@ -1,41 +0,0 @@
----
-Checks:
-'clang-diagnostic-*,clang-analyzer-*,performance-*,readability-*,modernize-*,bugprone-*,misc-*,-modernize-use-trailing-return-type'
-WarningsAsErrors: '*'
-HeaderFilterRegex: 'include/aws/.*\.h$'
-FormatStyle: 'none'
-CheckOptions:
- - key: modernize-pass-by-value.ValuesOnly
- value: '1'
- - key: readability-implicit-bool-conversion.AllowPointerConditions
- value: '1'
- - key: readability-implicit-bool-conversion.AllowIntegerConditions
- value: '1'
- - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
- value: '1'
- - key: readability-identifier-naming.ClassCase
- value: 'lower_case'
- - key: readability-identifier-naming.StructCase
- value: 'lower_case'
- - key: readability-identifier-naming.StructCase
- value: 'lower_case'
- - key: readability-identifier-naming.ParameterCase
- value: 'lower_case'
- - key: readability-identifier-naming.PrivateMemberCase
- value: 'lower_case'
- - key: readability-identifier-naming.LocalVariableCase
- value: 'lower_case'
- - key: readability-identifier-naming.TypeAliasCase
- value: 'lower_case'
- - key: readability-identifier-naming.UnionCase
- value: 'lower_case'
- - key: readability-identifier-naming.FunctionCase
- value: 'lower_case'
- - key: readability-identifier-naming.NamespaceCase
- value: 'lower_case'
- - key: readability-identifier-naming.GlobalConstantCase
- value: 'UPPER_CASE'
- - key: readability-identifier-naming.PrivateMemberPrefix
- value: 'm_'
-
-...
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index ab40d21d7..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,6 +0,0 @@
-*Issue #, if available:*
-
-*Description of changes:*
-
-
-By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore
deleted file mode 100644
index 647f44937..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build
-tags
-TODO
-compile_commands.json
-.clangd
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt
deleted file mode 100644
index 1765caf06..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-set(CMAKE_CXX_STANDARD 11)
-project(aws-lambda-runtime
- VERSION 0.2.7
- LANGUAGES CXX)
-
-option(ENABLE_LTO "Enables link-time optimization, requires compiler support." ON)
-option(ENABLE_TESTS "Enables building the test project, requires AWS C++ SDK." OFF)
-
-add_library(${PROJECT_NAME}
- "src/logging.cpp"
- "src/runtime.cpp"
- "src/backward.cpp"
- "${CMAKE_CURRENT_BINARY_DIR}/version.cpp"
- )
-
-set_target_properties(${PROJECT_NAME} PROPERTIES
- SOVERSION 0
- VERSION ${PROJECT_VERSION})
-
-target_include_directories(${PROJECT_NAME} PUBLIC
- $
- $)
-
-if (ENABLE_LTO)
- include(CheckIPOSupported)
- check_ipo_supported(RESULT has_lto OUTPUT lto_check_output)
- if(has_lto)
- set_property(TARGET ${PROJECT_NAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
- else()
- message(WARNING "Link-time optimization (LTO) is not supported: ${lto_check_output}")
- endif()
-endif()
-
-find_package(CURL REQUIRED)
-if (CMAKE_VERSION VERSION_LESS 3.12)
- target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES})
-else()
- target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
-endif()
-
-target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})
-
-target_compile_options(${PROJECT_NAME} PRIVATE
- "-fno-exceptions"
- "-fno-rtti"
- "-fvisibility=hidden"
- "-fvisibility-inlines-hidden"
- "-Wall"
- "-Wextra"
- "-Werror"
- "-Wconversion"
- "-Wno-sign-conversion")
-
-find_library(DW_LIB NAMES dw)
-if (NOT DW_LIB STREQUAL DW_LIB-NOTFOUND)
- message("-- Enhanced stack-traces are enabled via libdw: ${DW_LIB}")
- target_compile_definitions(${PROJECT_NAME} PRIVATE "BACKWARD_HAS_DW=1")
- target_link_libraries(${PROJECT_NAME} PUBLIC "${DW_LIB}")
-else()
- find_library(BFD_LIB NAMES bfd)
- if (NOT BFD_LIB STREQUAL BFD_LIB-NOTFOUND)
- message("-- Enhanced stack-traces are enabled via libbfd: ${BFD_LIB}")
- target_compile_definitions(${PROJECT_NAME} PRIVATE "BACKWARD_HAS_BFD=1")
- target_link_libraries(${PROJECT_NAME} PRIVATE "${BFD_LIB}")
- endif()
-endif()
-
-if (LOG_VERBOSITY)
- target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=${LOG_VERBOSITY}")
-elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
- target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=3")
-else ()
- target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=0")
-endif()
-
-#tests
-if (ENABLE_TESTS)
- enable_testing()
- add_subdirectory(tests)
-endif()
-
-#versioning
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/src/version.cpp.in"
- "${CMAKE_CURRENT_BINARY_DIR}/version.cpp"
- NEWLINE_STYLE LF)
-
-include (CMakePackageConfigHelpers)
-
-write_basic_package_version_file("${PROJECT_NAME}-config-version.cmake"
- VERSION ${PROJECT_VERSION}
- COMPATIBILITY SameMajorVersion)
-
-# installation
-install(FILES "include/aws/http/response.h"
- DESTINATION "include/aws/http")
-
-install(FILES
- "include/aws/lambda-runtime/runtime.h"
- "include/aws/lambda-runtime/version.h"
- "include/aws/lambda-runtime/outcome.h"
- DESTINATION "include/aws/lambda-runtime")
-
-install(FILES "include/aws/logging/logging.h"
- DESTINATION "include/aws/logging")
-
-include(GNUInstallDirs)
-install(TARGETS ${PROJECT_NAME}
- EXPORT ${PROJECT_NAME}-targets
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- )
-
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
- @ONLY)
-
-export(EXPORT "${PROJECT_NAME}-targets" NAMESPACE AWS::)
-
-install(EXPORT "${PROJECT_NAME}-targets"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/"
- NAMESPACE AWS::)
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/")
-
-install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/packaging/packager"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/")
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md
deleted file mode 100644
index 3b6446687..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## Code of Conduct
-This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
-For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
-opensource-codeofconduct@amazon.com with any additional questions or comments.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md
deleted file mode 100644
index e8c3aa58e..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Contributing Guidelines
-
-Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
-documentation, we greatly value feedback and contributions from our community.
-
-Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
-information to effectively respond to your bug report or contribution.
-
-
-## Reporting Bugs/Feature Requests
-
-We welcome you to use the GitHub issue tracker to report bugs or suggest features.
-
-When filing an issue, please check [existing open](https://github.com/awslabs/aws-lambda-cpp-runtime/issues), or [recently closed](https://github.com/awslabs/aws-lambda-cpp-runtime/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
-reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
-
-* A reproducible test case or series of steps
-* The version of our code being used
-* Any modifications you've made relevant to the bug
-* Anything unusual about your environment or deployment
-
-
-## Contributing via Pull Requests
-Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
-
-1. You are working against the latest source on the *master* branch.
-2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
-3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
-
-To send us a pull request, please:
-
-1. Fork the repository.
-2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
-3. Ensure local tests pass.
-4. Commit to your fork using clear commit messages.
-5. Send us a pull request, answering any default questions in the pull request interface.
-6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
-
-GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
-[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
-
-
-## Finding contributions to work on
-Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-lambda-cpp-runtime/labels/help%20wanted) issues is a great place to start.
-
-
-## Code of Conduct
-This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
-For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
-opensource-codeofconduct@amazon.com with any additional questions or comments.
-
-
-## Security issue notifications
-If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
-
-
-## Licensing
-
-See the [LICENSE](https://github.com/awslabs/aws-lambda-cpp-runtime/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
-
-We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE
deleted file mode 100644
index 34e186a0d..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE
+++ /dev/null
@@ -1,2 +0,0 @@
-AWS Lambda Cpp Runtime
-Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md
deleted file mode 100644
index 0812476a0..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md
+++ /dev/null
@@ -1,220 +0,0 @@
-[](https://github.com/awslabs/aws-lambda-cpp/blob/master/LICENSE)
-
-[](https://lgtm.com/projects/g/awslabs/aws-lambda-cpp/context:cpp)
-## AWS Lambda C++ Runtime
-
-C++ implementation of the lambda runtime API
-
-## Design Goals
-1. Negligible cold-start overhead (single digit millisecond).
-2. Freedom of choice in compilers, build platforms and C standard library versions.
-
-## Building and Installing the Runtime
-Since AWS Lambda runs on GNU/Linux, you should build this runtime library and your logic on GNU/Linux as well.
-
-### Prerequisites
-Make sure you have the following packages installed first:
-1. CMake (version 3.9 or later)
-1. git
-1. Make or Ninja
-1. zip
-1. libcurl-devel (on Debian-basded distros it's libcurl4-openssl-dev)
-
-In a terminal, run the following commands:
-```bash
-$ git clone https://github.com/awslabs/aws-lambda-cpp.git
-$ cd aws-lambda-cpp
-$ mkdir build
-$ cd build
-$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/lambda-install
-$ make && make install
-```
-
-To consume this library in a project that is also using CMake, you would do:
-
-```cmake
-cmake_minimum_required(VERSION 3.9)
-set(CMAKE_CXX_STANDARD 11)
-project(demo LANGUAGES CXX)
-find_package(aws-lambda-runtime)
-add_executable(${PROJECT_NAME} "main.cpp")
-target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime)
-target_compile_features(${PROJECT_NAME} PRIVATE "cxx_std_11")
-target_compile_options(${PROJECT_NAME} PRIVATE "-Wall" "-Wextra")
-
-# this line creates a target that packages your binary and zips it up
-aws_lambda_package_target(${PROJECT_NAME})
-```
-
-And here is how a sample `main.cpp` would look like:
-```cpp
-#include
-
-using namespace aws::lambda_runtime;
-
-static invocation_response my_handler(invocation_request const& req)
-{
- if (req.payload.length() > 42) {
- return invocation_response::failure("error message here"/*error_message*/,
- "error type here" /*error_type*/);
- }
-
- return invocation_response::success("json payload here" /*payload*/,
- "application/json" /*MIME type*/);
-}
-
-int main()
-{
- run_handler(my_handler);
- return 0;
-}
-```
-
-And finally, here's how you would package it all. Run the following commands from your application's root directory:
-
-```bash
-$ mkdir build
-$ cd build
-$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/lambda-install
-$ make
-$ make aws-lambda-package-demo
-```
-The last command above `make aws-lambda-package-demo` will create a zip file called `demo.zip` in the current directory.
-
-Now, create an IAM role and the Lambda function via the AWS CLI.
-
-First create the following trust policy JSON file
-
-```
-$ cat trust-policy.json
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Service": ["lambda.amazonaws.com"]
- },
- "Action": "sts:AssumeRole"
- }
- ]
-}
-
-```
-Then create the IAM role:
-
-```bash
-$ aws iam create-role --role-name lambda-demo --assume-role-policy-document file://trust-policy.json
-```
-
-Note down the role Arn returned to you after running that command. We'll need it in the next steps:
-
-Attach the following policy to allow Lambda to write logs in CloudWatch:
-```bash
-$ aws iam attach-role-policy --role-name lambda-demo --policy-arn arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
-```
-
-Make sure you attach the appropriate policies and/or permissions for any other AWS services that you plan on using.
-
-And finally, create the Lambda function:
-
-```
-$ aws lambda create-function --function-name demo \
---role \
---runtime provided --timeout 15 --memory-size 128 \
---handler demo --zip-file fileb://demo.zip
-```
-
-And to invoke the function:
-```bash
-$ aws lambda invoke --function-name demo --payload '{"answer":42}' output.txt
-```
-
-## Using the C++ SDK for AWS with this runtime
-This library is completely independent from the AWS C++ SDK. You should treat the AWS C++ SDK as just another dependency in your application.
-See [the examples section](https://github.com/awslabs/aws-lambda-cpp/tree/master/examples/) for a demo utilizing the AWS C++ SDK with this Lambda runtime.
-
-## Supported Compilers
-Any *fully* compliant C++11 compiler targeting GNU/Linux x86-64 should work. Please avoid compiler versions that provide half-baked C++11 support.
-
-- Use GCC v5.x or above
-- Use Clang v3.3 or above
-
-## Packaging, ABI, GNU C Library, Oh My!
-Lambda runs your code on some version of Amazon Linux. It would be a less than ideal customer experience if you are forced to build your application on that platform and that platform only.
-
-However, the freedom to build on any linux distro brings a challenge. The GNU C Library ABI. There is no guarantee the platform used to build the Lambda function has the same GLIBC version as the one used by AWS Lambda. In fact, you might not even be using GNU's implementation. For example you could build a C++ Lambda function using musl libc.
-
-To ensure that your application will run correctly on Lambda, we must package the entire C runtime library with your function.
-If you choose to build on the same [Amazon Linux version used by lambda](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html), you can avoid packaging the C runtime in your zip file.
-This can be done by passing the `NO_LIBC` flag in CMake as follows:
-
-```cmake
-aws_lambda_package_target(${PROJECT_NAME} NO_LIBC)
-```
-### Common Pitfalls with Packaging
-
-* Any library dependency your Lambda function has that is dynamically loaded via `dlopen` will NOT be automatically packaged. You **must** add those dependencies manually to the zip file.
-This applies to any configuration or resource files that your code depends on.
-
-* If you are making HTTP calls over TLS (https), keep in mind that the CA bundle location is different between distros.
-For example, if you are using the AWS C++ SDK, it's best to set the following configuration options:
-
-```cpp
-Aws::Client::ClientConfiguration config;
-config.caFile = "/etc/pki/tls/certs/ca-bundle.crt";
-```
-If you are not using the AWS C++ SDK, but happen to be using libcurl directly, you can set the CA bundle location by doing:
-```c
-curl_easy_setopt(curl_handle, CURLOPT_CAINFO, "/etc/pki/tls/certs/ca-bundle.crt");
-```
-
-## FAQ & Troubleshooting
-1. **Why is the zip file so large? what are all those files?**
- Typically, the zip file is large because we have to package the entire C standard library.
- You can reduce the size by doing some or all of the following:
- - Ensure you're building in release mode `-DCMAKE_BUILD_TYPE=Release`
- - If possible, build your function using musl libc, it's tiny. The easiest way to do this, assuming your code is portable, is to build on Alpine linux, which uses musl libc by default.
-1. **How to upload a zip file that's bigger than 50MB via the CLI?**
- Upload your zip file to S3 first:
- ```bash
- $ aws s3 cp demo.zip s3://mys3bucket/demo.zip
- ```
- NOTE: you must use the same region for your S3 bucket as the lambda.
-
- Then you can create the Lambda function this way:
-
- ```bash
- $ aws lambda create-function --function-name demo \
- --role \
- --runtime provided --timeout 15 --memory-size 128 \
- --handler demo
- --code "S3Bucket=mys3bucket,S3Key=demo.zip"
- ```
-1. **My code is crashing, how can I debug it?**
-
- - Starting with [v0.2.0](https://github.com/awslabs/aws-lambda-cpp/releases/tag/v0.2.0) you should see a stack-trace of the crash site in the logs (which are typically stored in CloudWatch).
- - To get a more detailed stack-trace with source-code information such as line numbers, file names, etc. you need to install one of the following packages:
- - On Debian-based systems - `sudo apt install libdw-dev` or `sudo apt install binutils-dev`
- - On RHEL based systems - `sudo yum install elfutils-devel` or `sudo yum install binutils-devel`
- If you have either of those packages installed, CMake will detect them and automatically link to them. No other
- steps are required.
- - Turn up the logging verbosity to the maximum.
- - Build the runtime in Debug mode. `-DCMAKE_BUILD_TYPE=Debug`. Verbose logs are enabled by default in Debug builds.
- - To enable verbose logs in Release builds, build the runtime with the following CMake flag `-DLOG_VERBOSITY=3`
- - If you are using the AWS C++ SDK, see [this FAQ](https://github.com/aws/aws-sdk-cpp/wiki#how-do-i-turn-on-logging) on how to adjust its logging verbosity
- - Run your code locally on an Amazon Linux AMI or Docker container to reproduce the problem
- - If you go the AMI route, [use the official one](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) recommended by AWS Lambda
- - If you go the Docker route, use the following command to launch a container running AL2017.03
- `$ docker run -v /tmp:/tmp -it --security-opt seccomp=unconfined amazonlinux:2017.03`
- The `security-opt` argument is necessary to run `gdb`, `strace`, etc.
-1. **CURL problem with the SSL CA cert**
- - Make sure you are using a `libcurl` version built with OpenSSL, or one of its flavors (BoringSSL, LibreSSL)
- - Make sure you tell `libcurl` where to find the CA bundle file.
- - You can try hitting the non-TLS version of the endpoint if available. (Not Recommended).
-1. **No known conversion between `std::string` and `Aws::String`**
- - Either turn off custom memory management in the AWS C++ SDK or build it as a static library (`-DBUILD_SHARED_LIBS=OFF`)
-
-## License
-
-This library is licensed under the Apache 2.0 License.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml
deleted file mode 100644
index eab1bafb5..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-version: 0.1
-# This uses the docker image specified in ci/docker/amazon-linux-2017.03
-phases:
- pre_build:
- commands:
- - alias cmake=cmake3
- - pip install awscli
- - ci/codebuild/build-cpp-sdk.sh
- build:
- commands:
- - echo Build started on `date`
- - ci/codebuild/build.sh -DENABLE_TESTS=ON -DTEST_RESOURCE_PREFIX=amzn201703
- - ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun amzn201703
- - ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun-no-glibc amzn201703
- post_build:
- commands:
- - echo Build completed on `date`
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh
deleted file mode 100755
index 93ae7ebec..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-# build the AWS C++ SDK
-cd /aws-sdk-cpp
-git pull
-mkdir build
-cd build
-cmake .. -GNinja -DBUILD_ONLY="lambda" \
- -DCMAKE_BUILD_TYPE=Release \
- -DENABLE_UNITY_BUILD=ON \
- -DBUILD_SHARED_LIBS=ON \
- -DENABLE_TESTING=OFF \
- -DCMAKE_INSTALL_PREFIX=/install $@
-ninja
-ninja install
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh
deleted file mode 100755
index 53a9544e2..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-# build the lambda-runtime
-cd $CODEBUILD_SRC_DIR
-mkdir build
-cd build
-cmake .. -GNinja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/install $@
-ninja
-ninja install
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh
deleted file mode 100755
index 3afb80230..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-CLANG_FORMAT=clang-format
-
-if NOT type $CLANG_FORMAT > /dev/null 2>&1; then
- echo "No appropriate clang-format found."
- exit 1
-fi
-
-FAIL=0
-SOURCE_FILES=$(find src include tests -type f -name "*.h" -o -name "*.cpp")
-for i in $SOURCE_FILES
-do
- if [ $($CLANG_FORMAT -output-replacements-xml $i | grep -c "
- DEPENDS ${target})
-endfunction()
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile
deleted file mode 100644
index aabb4dd42..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM alpine:latest
-
-RUN apk update && apk add cmake make git g++ bash curl-dev zlib-dev
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt
deleted file mode 100644
index 02da6ccf6..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-set(CMAKE_CXX_STANDARD 11)
-
-project(api LANGUAGES CXX)
-
-find_package(aws-lambda-runtime REQUIRED)
-find_package(AWSSDK COMPONENTS core)
-
-add_executable(${PROJECT_NAME} "main.cpp")
-target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-lambda-runtime ${AWSSDK_LINK_LIBRARIES})
-
-aws_lambda_package_target(${PROJECT_NAME})
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md
deleted file mode 100644
index d184165b6..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Example using the AWS C++ Lambda runtime and Amazon API Gateway
-
-In this example, we'll build a simple "Hello, World" lambda function that can be invoked using an api endpoint created using Amazon API gateway. This example can be viewed as the C++ counterpart to the NodeJS "Hello, World" API example as viewed [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html). At the end of this example, you should be able to invoke your lambda via an api endpoint and receive a raw JSON response. This example employs the use of the AWS C++ SDK to parse the request and write the necessary response.
-
-## Build the AWS C++ SDK
-Start by building the SDK from source.
-
-```bash
-$ mkdir ~/install
-$ git clone https://github.com/aws/aws-sdk-cpp.git
-$ cd aws-sdk-cpp
-$ mkdir build
-$ cd build
-$ cmake .. -DBUILD_ONLY="core" \
- -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DENABLE_UNITY_BUILD=ON \
- -DCUSTOM_MEMORY_MANAGEMENT=OFF \
- -DCMAKE_INSTALL_PREFIX=~/install \
- -DENABLE_UNITY_BUILD=ON
-$ make
-$ make install
-```
-
-## Build the Runtime
-We need to build the C++ Lambda runtime as outlined in the other examples.
-
-```bash
-$ git clone https://github.com/awslabs/aws-lambda-cpp-runtime.git
-$ cd aws-lambda-cpp-runtime
-$ mkdir build
-$ cd build
-$ cmake .. -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DCMAKE_INSTALL_PREFIX=~/install \
-$ make
-$ make install
-```
-
-## Build the application
-The next step is to build the Lambda function in `main.cpp` and run the packaging command as follows:
-
-```bash
-$ mkdir build
-$ cd build
-$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
-$ make
-$ make aws-lambda-package-api
-```
-
-You should now have a zip file called `api.zip`. Follow the instructions in the main README to upload it and return here once complete.
-
-## Using Amazon API Gateway
-For the rest of this example, we will use the AWS Management Console to create the API endpoint using Amazon API Gateway.
-
-1. Navigate to AWS Lambda within the console [here](https://console.aws.amazon.com/lambda/home)
-1. Select the newly created function. Within the specific function, the "Designer" window should appear.
-1. Simply click "Add trigger" -> "API Gateway" -> "Create an API". Please view the settings below.
- * API Type: HTTP API
- * Security: Open
- * API name: Hello-World-API (or desired name)
- * Deployment stage: default
-1. Once you have added the API gateway, locate the newly created endpoint. View how to test the endpoint below.
-
-## Test the endpoint
-Feel free to test the endpoint any way you desire. Below is a way to test using cURL:
-
-```
-curl -v -X POST \
- '?name=Bradley&city=Chicago' \
- -H 'content-type: application/json' \
- -H 'day: Sunday' \
- -d '{ "time": "evening" }'
-```
-
-With the expected response being:
-```
-{
- "message": "Good evening, Bradley of Chicago. Happy Sunday!"
-}
-```
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp
deleted file mode 100644
index 90f103551..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include
-#include
-#include
-
-using namespace aws::lambda_runtime;
-
-invocation_response my_handler(invocation_request const& request)
-{
-
- using namespace Aws::Utils::Json;
-
- JsonValue json(request.payload);
- if (!json.WasParseSuccessful()) {
- return invocation_response::failure("Failed to parse input JSON", "InvalidJSON");
- }
-
- auto v = json.View();
- Aws::SimpleStringStream ss;
- ss << "Good ";
-
- if (v.ValueExists("body") && v.GetObject("body").IsString()) {
- auto body = v.GetString("body");
- JsonValue body_json(body);
-
- if (body_json.WasParseSuccessful()) {
- auto body_v = body_json.View();
- ss << (body_v.ValueExists("time") && body_v.GetObject("time").IsString() ? body_v.GetString("time") : "");
- }
- }
- ss << ", ";
-
- if (v.ValueExists("queryStringParameters")) {
- auto query_params = v.GetObject("queryStringParameters");
- ss << (query_params.ValueExists("name") && query_params.GetObject("name").IsString()
- ? query_params.GetString("name")
- : "")
- << " of ";
- ss << (query_params.ValueExists("city") && query_params.GetObject("city").IsString()
- ? query_params.GetString("city")
- : "")
- << ". ";
- }
-
- if (v.ValueExists("headers")) {
- auto headers = v.GetObject("headers");
- ss << "Happy "
- << (headers.ValueExists("day") && headers.GetObject("day").IsString() ? headers.GetString("day") : "")
- << "!";
- }
-
- JsonValue resp;
- resp.WithString("message", ss.str());
-
- return invocation_response::success(resp.View().WriteCompact(), "application/json");
-}
-
-int main()
-{
- run_handler(my_handler);
- return 0;
-}
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt
deleted file mode 100644
index 8447e0197..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-set(CMAKE_CXX_STANDARD 11)
-project(ddb-demo LANGUAGES CXX)
-
-find_package(aws-lambda-runtime)
-find_package(AWSSDK COMPONENTS dynamodb)
-
-add_executable(${PROJECT_NAME} "main.cpp")
-
-target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-lambda-runtime ${AWSSDK_LINK_LIBRARIES})
-
-target_compile_options(${PROJECT_NAME} PRIVATE
- "-fno-exceptions"
- "-fno-rtti"
- "-Wall"
- "-Wextra"
- "-Werror"
- "-Wconversion"
- "-Wno-sign-conversion")
-
-target_compile_features(${PROJECT_NAME} PRIVATE "cxx_std_11")
-
-aws_lambda_package_target(${PROJECT_NAME})
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md
deleted file mode 100644
index db84fd87e..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# Example using the AWS C++ SDK with Lambda & DynamoDB
-
-We'll build a Lambda function that can be used as an API Gateway proxy to fetch records from a DynamoDB table.
-To also show case how this can be done on a Linux distro other than Amazon Linux, you can use the Dockerfile in this directory to create an Alpine Linux environment in which you can run the following instructions.
-
-That being said, the instructions below should work on any Linux distribution.
-
-## Build the AWS C++ SDK
-Start by building the SDK from source.
-```bash
-$ mkdir ~/install
-$ git clone https://github.com/aws/aws-sdk-cpp.git
-$ cd aws-sdk-cpp
-$ mkdir build
-$ cd build
-$ cmake .. -DBUILD_ONLY="dynamodb" \
- -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DENABLE_UNITY_BUILD=ON \
- -DCUSTOM_MEMORY_MANAGEMENT=OFF \
- -DCMAKE_INSTALL_PREFIX=~/install \
- -DENABLE_UNITY_BUILD=ON
-
-$ make -j 4
-$ make install
-```
-
-## Build the Runtime
-Now let's build the C++ Lambda runtime, so in a separate directory clone this repository and follow these steps:
-
-```bash
-$ git clone https://github.com/awslabs/aws-lambda-cpp-runtime.git
-$ cd aws-lambda-cpp-runtime
-$ mkdir build
-$ cd build
-$ cmake .. -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DCMAKE_INSTALL_PREFIX=~/install \
-$ make
-$ make install
-```
-
-## Build the application
-The last step is to build the Lambda function in `main.cpp` and run the packaging command as follows:
-
-```bash
-$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
-$ make
-$ make aws-lambda-package-ddb-demo
-```
-
-You should now have a zip file called `ddb-demo.zip`. Follow the instructions in the main README to upload it and invoke the lambda.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp
deleted file mode 100644
index a8b86621a..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-// API Gateway Input format
-// {
-// "resource": "Resource path",
-// "path": "Path parameter",
-// "httpMethod": "Incoming request's method name"
-// "headers": {String containing incoming request headers}
-// "multiValueHeaders": {List of strings containing incoming request headers}
-// "queryStringParameters": {query string parameters }
-// "multiValueQueryStringParameters": {List of query string parameters}
-// "pathParameters": {path parameters}
-// "stageVariables": {Applicable stage variables}
-// "requestContext": {Request context, including authorizer-returned key-value pairs}
-// "body": "A JSON string of the request payload."
-// "isBase64Encoded": "A boolean flag to indicate if the applicable request payload is Base64-encode"
-// }
-
-static char const TAG[] = "lambda";
-
-struct criteria {
- criteria(Aws::Utils::Json::JsonView data) : error_msg(nullptr)
- {
- using namespace Aws::Utils;
- auto path_params = data.GetObject("pathParameters");
- if (!path_params.ValueExists("productId")) {
- error_msg = "Missing URL parameter {productId}.";
- return;
- }
-
- product_id = path_params.GetString("productId");
- auto qs = data.GetObject("queryStringParameters");
-
- if (!qs.ValueExists("startDate")) {
- error_msg = "Missing query string parameter 'startDate'.";
- return;
- }
- start_date = DateTime(qs.GetString("startDate"), DateFormat::ISO_8601);
- if (!start_date.WasParseSuccessful()) {
- error_msg = "Invalid input format. startDate must be in ISO 8601 format.";
- return;
- }
-
- if (!qs.ValueExists("endDate")) {
- error_msg = "Missing query string parameter 'endDate'.";
- return;
- }
- end_date = DateTime(qs.GetString("endDate"), DateFormat::ISO_8601);
- if (!end_date.WasParseSuccessful()) {
- error_msg = "Invalid input format. endDate must be in ISO 8601 format.";
- return;
- }
- }
-
- std::string product_id;
- Aws::Utils::DateTime start_date;
- Aws::Utils::DateTime end_date;
- char const* error_msg;
-};
-
-Aws::Utils::Json::JsonValue query(criteria const cr, Aws::DynamoDB::DynamoDBClient const& client)
-{
- using namespace Aws::DynamoDB;
- using namespace Aws::DynamoDB::Model;
- using namespace Aws::Utils::Json;
-
- AWS_LOGSTREAM_DEBUG(
- TAG,
- "criteria is: product_id: " << cr.product_id << " start_date epoch: " << cr.start_date.Millis()
- << " end_date epoch: " << cr.end_date.Millis());
-
- QueryRequest query;
-
- auto const& table_name = Aws::Environment::GetEnv("TABLE_NAME");
- query.SetTableName(table_name);
- query.SetKeyConditionExpression("#H = :h AND #R BETWEEN :s AND :e");
- query.AddExpressionAttributeNames("#H", "product_id");
- query.AddExpressionAttributeNames("#R", "date_time");
-
- query.AddExpressionAttributeValues(":h", AttributeValue(cr.product_id));
- AttributeValue date;
- date.SetN(std::to_string(cr.start_date.Millis() / 1000));
- query.AddExpressionAttributeValues(":s", date);
-
- date.SetN(std::to_string(cr.end_date.Millis() / 1000));
- query.AddExpressionAttributeValues(":e", date);
-
- auto outcome = client.Query(query);
- if (outcome.IsSuccess()) {
- auto const& maps = outcome.GetResult().GetItems(); // returns vector of map
- if (maps.empty()) {
- AWS_LOGSTREAM_DEBUG(TAG, "No data returned from query");
- return {};
- }
-
- // Schema
- // string_attr :product_id, hash_key: true
- // epoch_time_attr :date_time, range_key: true
- // string_attr :product_title
- // string_attr :marketplace
- // string_attr :product_category
- // date_attr :review_date
- // integer_attr :star_rating
- // float_attr :postive
- // float_attr :mixed
- // float_attr :neutral
- // float_attr :negative
-
- JsonValue output;
- output.WithString("product", maps[0].find("product_title")->second.GetS());
- output.WithString("category", maps[0].find("product_category")->second.GetS());
- Aws::Utils::Array sentiments(maps.size());
- for (size_t i = 0; i < maps.size(); i++) {
- JsonValue review;
- auto&& m = maps[i];
-
- auto it = m.find("review_date");
- if (it != m.end()) {
- review.WithString("date", it->second.GetS());
- }
-
- it = m.find("positive");
- if (it != m.end()) {
- review.WithString("positive", it->second.GetN());
- }
-
- it = m.find("negative");
- if (it != m.end()) {
- review.WithString("negative", it->second.GetN());
- }
-
- it = m.find("mixed");
- if (it != m.end()) {
- review.WithString("mixed", it->second.GetN());
- }
-
- it = m.find("neutral");
- if (it != m.end()) {
- review.WithString("neutral", it->second.GetN());
- }
-
- sentiments[i] = std::move(review);
- }
- output.WithArray("sentiment", sentiments);
- return output;
- }
-
- AWS_LOGSTREAM_ERROR(TAG, "database query failed: " << outcome.GetError());
- return {};
-}
-
-
-aws::lambda_runtime::invocation_response my_handler(
- aws::lambda_runtime::invocation_request const& req,
- Aws::DynamoDB::DynamoDBClient const& client)
-{
- using namespace Aws::Utils::Json;
- AWS_LOGSTREAM_DEBUG(TAG, "received payload: " << req.payload);
- JsonValue eventJson(req.payload);
- assert(eventJson.WasParseSuccessful());
- const criteria cr(eventJson);
- if (cr.error_msg) {
- JsonValue response;
- response.WithString("body", cr.error_msg).WithInteger("statusCode", 400);
- auto const apig_response = response.View().WriteCompact();
- AWS_LOGSTREAM_ERROR(TAG, "Validation failed. " << apig_response);
- return aws::lambda_runtime::invocation_response::success(apig_response, "application/json");
- }
-
- auto result = query(cr, client);
- auto const query_response = result.View().WriteCompact();
- AWS_LOGSTREAM_DEBUG(TAG, "query response: " << query_response);
-
- JsonValue response;
- if (result.View().ValueExists("product")) {
- response.WithString("body", query_response).WithInteger("statusCode", 200);
- }
- else {
- response.WithString("body", "No data found for this product.").WithInteger("statusCode", 400);
- }
-
- auto const apig_response = response.View().WriteCompact();
- AWS_LOGSTREAM_DEBUG(TAG, "api gateway response: " << apig_response);
-
- return aws::lambda_runtime::invocation_response::success(apig_response, "application/json");
-}
-
-std::function()> GetConsoleLoggerFactory()
-{
- return [] {
- return Aws::MakeShared(
- "console_logger", Aws::Utils::Logging::LogLevel::Trace);
- };
-}
-
-int main()
-{
- using namespace Aws;
- SDKOptions options;
- options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
- options.loggingOptions.logger_create_fn = GetConsoleLoggerFactory();
- InitAPI(options);
- {
- Aws::Client::ClientConfiguration config;
- config.region = Aws::Environment::GetEnv("AWS_REGION");
- config.caFile = "/etc/pki/tls/certs/ca-bundle.crt";
- config.disableExpectHeader = true;
-
- auto credentialsProvider = Aws::MakeShared(TAG);
- Aws::DynamoDB::DynamoDBClient client(credentialsProvider, config);
- auto handler_fn = [&client](aws::lambda_runtime::invocation_request const& req) {
- return my_handler(req, client);
- };
- aws::lambda_runtime::run_handler(handler_fn);
- }
- ShutdownAPI(options);
- return 0;
-}
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt
deleted file mode 100644
index b398a4e2d..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-set(CMAKE_CXX_STANDARD 11)
-project(encoder LANGUAGES CXX)
-
-find_package(aws-lambda-runtime)
-find_package(AWSSDK COMPONENTS s3)
-
-add_executable(${PROJECT_NAME} "main.cpp")
-
-target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime ${AWSSDK_LINK_LIBRARIES})
-
-target_compile_options(${PROJECT_NAME} PRIVATE
- "-Wall"
- "-Wextra"
- "-Wconversion"
- "-Wshadow"
- "-Wno-sign-conversion")
-
-target_compile_features(${PROJECT_NAME} PRIVATE "cxx_std_11")
-
-aws_lambda_package_target(${PROJECT_NAME})
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md
deleted file mode 100644
index 8bc3255a4..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Example using the AWS C++ SDK with Lambda
-
-We'll build a lambda that downloads an image file from S3 and sends it back in the response as Base64 encoded that can be displayed in a web page for example.
-To also show case how this can be done on a Linux distro other than Amazon Linux, you can use the Dockerfile in this directory to create an Alpine Linux environment in which you can run the following instructions.
-
-That being said, the instructions below should work on any Linux distribution.
-
-## Build the AWS C++ SDK
-Start by building the SDK from source.
-```bash
-$ mkdir ~/install
-$ git clone https://github.com/aws/aws-sdk-cpp.git
-$ cd aws-sdk-cpp
-$ mkdir build
-$ cd build
-$ cmake .. -DBUILD_ONLY="s3" \
- -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DCUSTOM_MEMORY_MANAGEMENT=OFF \
- -DCMAKE_INSTALL_PREFIX=~/install \
- -DENABLE_UNITY_BUILD=ON
-
-$ make
-$ make install
-```
-
-## Build the Runtime
-Now let's build the C++ Lambda runtime, so in a separate directory clone this repository and follow these steps:
-
-```bash
-$ git clone https://github.com/awslabs/aws-lambda-cpp-runtime.git
-$ cd aws-lambda-cpp-runtime
-$ mkdir build
-$ cd build
-$ cmake .. -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DCMAKE_INSTALL_PREFIX=~/install \
-$ make
-$ make install
-```
-
-## Build the application
-The last step is to build the Lambda function in `main.cpp` and run the packaging command as follows:
-
-```bash
-$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
-$ make
-$ make aws-lambda-package-encoder
-```
-
-You should now have a zip file called `encoder.zip`. Follow the instructions in the main README to upload it and invoke the lambda.
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp
deleted file mode 100644
index 45b935bf3..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-using namespace aws::lambda_runtime;
-
-std::string download_and_encode_file(
- Aws::S3::S3Client const& client,
- Aws::String const& bucket,
- Aws::String const& key,
- Aws::String& encoded_output);
-
-std::string encode(Aws::String const& filename, Aws::String& output);
-char const TAG[] = "LAMBDA_ALLOC";
-
-static invocation_response my_handler(invocation_request const& req, Aws::S3::S3Client const& client)
-{
- using namespace Aws::Utils::Json;
- JsonValue json(req.payload);
- if (!json.WasParseSuccessful()) {
- return invocation_response::failure("Failed to parse input JSON", "InvalidJSON");
- }
-
- auto v = json.View();
-
- if (!v.ValueExists("s3bucket") || !v.ValueExists("s3key") || !v.GetObject("s3bucket").IsString() ||
- !v.GetObject("s3key").IsString()) {
- return invocation_response::failure("Missing input value s3bucket or s3key", "InvalidJSON");
- }
-
- auto bucket = v.GetString("s3bucket");
- auto key = v.GetString("s3key");
-
- AWS_LOGSTREAM_INFO(TAG, "Attempting to download file from s3://" << bucket << "/" << key);
-
- Aws::String base64_encoded_file;
- auto err = download_and_encode_file(client, bucket, key, base64_encoded_file);
- if (!err.empty()) {
- return invocation_response::failure(err, "DownloadFailure");
- }
-
- return invocation_response::success(base64_encoded_file, "application/base64");
-}
-
-std::function()> GetConsoleLoggerFactory()
-{
- return [] {
- return Aws::MakeShared(
- "console_logger", Aws::Utils::Logging::LogLevel::Trace);
- };
-}
-
-int main()
-{
- using namespace Aws;
- SDKOptions options;
- options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
- options.loggingOptions.logger_create_fn = GetConsoleLoggerFactory();
- InitAPI(options);
- {
- Client::ClientConfiguration config;
- config.region = Aws::Environment::GetEnv("AWS_REGION");
- config.caFile = "/etc/pki/tls/certs/ca-bundle.crt";
-
- auto credentialsProvider = Aws::MakeShared(TAG);
- S3::S3Client client(credentialsProvider, config);
- auto handler_fn = [&client](aws::lambda_runtime::invocation_request const& req) {
- return my_handler(req, client);
- };
- run_handler(handler_fn);
- }
- ShutdownAPI(options);
- return 0;
-}
-
-std::string encode(Aws::IOStream& stream, Aws::String& output)
-{
- Aws::Vector bits;
- bits.reserve(stream.tellp());
- stream.seekg(0, stream.beg);
-
- char streamBuffer[1024 * 4];
- while (stream.good()) {
- stream.read(streamBuffer, sizeof(streamBuffer));
- auto bytesRead = stream.gcount();
-
- if (bytesRead > 0) {
- bits.insert(bits.end(), (unsigned char*)streamBuffer, (unsigned char*)streamBuffer + bytesRead);
- }
- }
- Aws::Utils::ByteBuffer bb(bits.data(), bits.size());
- output = Aws::Utils::HashingUtils::Base64Encode(bb);
- return {};
-}
-
-std::string download_and_encode_file(
- Aws::S3::S3Client const& client,
- Aws::String const& bucket,
- Aws::String const& key,
- Aws::String& encoded_output)
-{
- using namespace Aws;
-
- S3::Model::GetObjectRequest request;
- request.WithBucket(bucket).WithKey(key);
-
- auto outcome = client.GetObject(request);
- if (outcome.IsSuccess()) {
- AWS_LOGSTREAM_INFO(TAG, "Download completed!");
- auto& s = outcome.GetResult().GetBody();
- return encode(s, encoded_output);
- }
- else {
- AWS_LOGSTREAM_ERROR(TAG, "Failed with error: " << outcome.GetError());
- return outcome.GetError().GetMessage();
- }
-}
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h
deleted file mode 100644
index 9b8cbda1f..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h
+++ /dev/null
@@ -1,174 +0,0 @@
-#pragma once
-/*
- * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://aws.amazon.com/apache2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-#include
-#include
-#include
-#include // tolower
-#include
-
-namespace aws {
-namespace http {
-enum class response_code;
-class response {
-public:
- /**
- * lower-case the name but store the value as is
- */
- inline void add_header(std::string name, std::string const& value);
- inline void append_body(const char* p, size_t sz);
- inline bool has_header(char const* header) const;
- inline std::string const& get_header(char const* header) const;
- inline response_code get_response_code() const { return m_response_code; }
- inline void set_response_code(aws::http::response_code c);
- inline void set_content_type(char const* ct);
- inline std::string const& get_body() const;
-
-private:
- response_code m_response_code;
- using key_value_collection = std::vector>;
- key_value_collection m_headers;
- std::string m_body;
- std::string m_content_type;
-};
-
-enum class response_code {
- REQUEST_NOT_MADE = -1,
- CONTINUE = 100,
- SWITCHING_PROTOCOLS = 101,
- PROCESSING = 102,
- OK = 200,
- CREATED = 201,
- ACCEPTED = 202,
- NON_AUTHORITATIVE_INFORMATION = 203,
- NO_CONTENT = 204,
- RESET_CONTENT = 205,
- PARTIAL_CONTENT = 206,
- MULTI_STATUS = 207,
- ALREADY_REPORTED = 208,
- IM_USED = 226,
- MULTIPLE_CHOICES = 300,
- MOVED_PERMANENTLY = 301,
- FOUND = 302,
- SEE_OTHER = 303,
- NOT_MODIFIED = 304,
- USE_PROXY = 305,
- SWITCH_PROXY = 306,
- TEMPORARY_REDIRECT = 307,
- PERMANENT_REDIRECT = 308,
- BAD_REQUEST = 400,
- UNAUTHORIZED = 401,
- PAYMENT_REQUIRED = 402,
- FORBIDDEN = 403,
- NOT_FOUND = 404,
- METHOD_NOT_ALLOWED = 405,
- NOT_ACCEPTABLE = 406,
- PROXY_AUTHENTICATION_REQUIRED = 407,
- REQUEST_TIMEOUT = 408,
- CONFLICT = 409,
- GONE = 410,
- LENGTH_REQUIRED = 411,
- PRECONDITION_FAILED = 412,
- REQUEST_ENTITY_TOO_LARGE = 413,
- REQUEST_URI_TOO_LONG = 414,
- UNSUPPORTED_MEDIA_TYPE = 415,
- REQUESTED_RANGE_NOT_SATISFIABLE = 416,
- EXPECTATION_FAILED = 417,
- IM_A_TEAPOT = 418,
- AUTHENTICATION_TIMEOUT = 419,
- METHOD_FAILURE = 420,
- UNPROC_ENTITY = 422,
- LOCKED = 423,
- FAILED_DEPENDENCY = 424,
- UPGRADE_REQUIRED = 426,
- PRECONDITION_REQUIRED = 427,
- TOO_MANY_REQUESTS = 429,
- REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
- LOGIN_TIMEOUT = 440,
- NO_RESPONSE = 444,
- RETRY_WITH = 449,
- BLOCKED = 450,
- REDIRECT = 451,
- REQUEST_HEADER_TOO_LARGE = 494,
- CERT_ERROR = 495,
- NO_CERT = 496,
- HTTP_TO_HTTPS = 497,
- CLIENT_CLOSED_TO_REQUEST = 499,
- INTERNAL_SERVER_ERROR = 500,
- NOT_IMPLEMENTED = 501,
- BAD_GATEWAY = 502,
- SERVICE_UNAVAILABLE = 503,
- GATEWAY_TIMEOUT = 504,
- HTTP_VERSION_NOT_SUPPORTED = 505,
- VARIANT_ALSO_NEGOTIATES = 506,
- INSUFFICIENT_STORAGE = 506,
- LOOP_DETECTED = 508,
- BANDWIDTH_LIMIT_EXCEEDED = 509,
- NOT_EXTENDED = 510,
- NETWORK_AUTHENTICATION_REQUIRED = 511,
- NETWORK_READ_TIMEOUT = 598,
- NETWORK_CONNECT_TIMEOUT = 599
-};
-
-inline void response::set_response_code(http::response_code c)
-{
- m_response_code = c;
-}
-
-inline void response::set_content_type(char const* ct)
-{
- m_content_type = ct;
-}
-
-inline std::string const& response::get_body() const
-{
- return m_body;
-}
-inline void response::add_header(std::string name, std::string const& value)
-{
- std::transform(name.begin(), name.end(), name.begin(), ::tolower);
- m_headers.emplace_back(name, value);
-}
-
-inline void response::append_body(const char* p, size_t sz)
-{
- // simple and generates significantly less code than std::stringstream
- constexpr size_t min_capacity = 512;
- if (m_body.capacity() < min_capacity) {
- m_body.reserve(min_capacity);
- }
-
- m_body.append(p, sz);
-}
-
-inline bool response::has_header(char const* header) const
-{
- return std::any_of(m_headers.begin(), m_headers.end(), [header](std::pair const& p) {
- return p.first == header;
- });
-}
-
-inline std::string const& response::get_header(char const* header) const
-{
- auto it = std::find_if(m_headers.begin(), m_headers.end(), [header](std::pair const& p) {
- return p.first == header;
- });
- assert(it != m_headers.end());
- return it->second;
-}
-
-} // namespace http
-} // namespace aws
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h
deleted file mode 100644
index b5d0b8b0a..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h
+++ /dev/null
@@ -1,96 +0,0 @@
-#pragma once
-/*
- * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://aws.amazon.com/apache2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-#include
-#include
-
-namespace aws {
-namespace lambda_runtime {
-
-template
-class outcome {
-public:
- outcome(TResult const& s) : m_s(s), m_success(true) {}
- outcome(TResult&& s) : m_s(std::move(s)), m_success(true) {}
-
- outcome(TFailure const& f) : m_f(f), m_success(false) {}
- outcome(TFailure&& f) : m_f(std::move(f)), m_success(false) {}
-
- outcome(outcome const& other) : m_success(other.m_success)
- {
- if (m_success) {
- new (&m_s) TResult(other.m_s);
- }
- else {
- new (&m_f) TFailure(other.m_f);
- }
- }
-
- outcome(outcome&& other) noexcept : m_success(other.m_success)
- {
- if (m_success) {
- new (&m_s) TResult(std::move(other.m_s));
- }
- else {
- new (&m_f) TFailure(std::move(other.m_f));
- }
- }
-
- ~outcome()
- {
- if (m_success) {
- m_s.~TResult();
- }
- else {
- m_f.~TFailure();
- }
- }
-
- TResult const& get_result() const&
- {
- assert(m_success);
- return m_s;
- }
-
- TResult&& get_result() &&
- {
- assert(m_success);
- return std::move(m_s);
- }
-
- TFailure const& get_failure() const&
- {
- assert(!m_success);
- return m_f;
- }
-
- TFailure&& get_failure() &&
- {
- assert(!m_success);
- return std::move(m_f);
- }
-
- bool is_success() const { return m_success; }
-
-private:
- union {
- TResult m_s;
- TFailure m_f;
- };
- bool m_success;
-};
-} // namespace lambda_runtime
-} // namespace aws
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h
deleted file mode 100644
index c4868c1ba..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h
+++ /dev/null
@@ -1,187 +0,0 @@
-#pragma once
-/*
- * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://aws.amazon.com/apache2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include "aws/lambda-runtime/outcome.h"
-#include "aws/http/response.h"
-
-namespace aws {
-namespace lambda_runtime {
-
-struct invocation_request {
- /**
- * The user's payload represented as a UTF-8 string.
- */
- std::string payload;
-
- /**
- * An identifier unique to the current invocation.
- */
- std::string request_id;
-
- /**
- * X-Ray tracing ID of the current invocation.
- */
- std::string xray_trace_id;
-
- /**
- * Information about the client application and device when invoked through the AWS Mobile SDK.
- */
- std::string client_context;
-
- /**
- * Information about the Amazon Cognito identity provider when invoked through the AWS Mobile SDK.
- */
- std::string cognito_identity;
-
- /**
- * The ARN requested. This can be different in each invoke that executes the same version.
- */
- std::string function_arn;
-
- /**
- * Function execution deadline counted in milliseconds since the Unix epoch.
- */
- std::chrono::time_point deadline;
-
- /**
- * Tenant ID of the current invocation.
- */
- std::string tenant_id;
-
- /**
- * The number of milliseconds left before lambda terminates the current execution.
- */
- inline std::chrono::milliseconds get_time_remaining() const;
-};
-
-class invocation_response {
-private:
- /**
- * The output of the function which is sent to the lambda caller.
- */
- std::string m_payload;
-
- /**
- * The MIME type of the payload.
- * This is always set to 'application/json' in unsuccessful invocations.
- */
- std::string m_content_type;
-
- /**
- * Flag to distinguish if the contents are for successful or unsuccessful invocations.
- */
- bool m_success;
-
- /**
- * Instantiate an empty response. Used by the static functions 'success' and 'failure' to create a populated
- * invocation_response
- */
- invocation_response() = default;
-
-public:
- // Create a success or failure response. Typically, you should use the static functions invocation_response::success
- // and invocation_response::failure, however, invocation_response::failure doesn't allow for arbitrary payloads.
- // To support clients that need to control the entire error response body (e.g. adding a stack trace), this
- // constructor should be used instead.
- // Note: adding an overload to invocation_response::failure is not feasible since the parameter types are the same.
- invocation_response(std::string const& payload, std::string const& content_type, bool success)
- : m_payload(payload), m_content_type(content_type), m_success(success)
- {
- }
-
- /**
- * Create a successful invocation response with the given payload and content-type.
- */
- static invocation_response success(std::string const& payload, std::string const& content_type);
-
- /**
- * Create a failure response with the given error message and error type.
- * The content-type is always set to application/json in this case.
- */
- static invocation_response failure(std::string const& error_message, std::string const& error_type);
-
- /**
- * Get the MIME type of the payload.
- */
- std::string const& get_content_type() const { return m_content_type; }
-
- /**
- * Get the payload string. The string is assumed to be UTF-8 encoded.
- */
- std::string const& get_payload() const { return m_payload; }
-
- /**
- * Returns true if the payload and content-type are set. Returns false if the error message and error types are set.
- */
- bool is_success() const { return m_success; }
-};
-
-struct no_result {
-};
-
-class runtime {
-public:
- using next_outcome = aws::lambda_runtime::outcome;
- using post_outcome = aws::lambda_runtime::outcome;
-
- runtime(std::string const& endpoint, std::string const& user_agent);
- runtime(std::string const& endpoint);
- ~runtime();
-
- /**
- * Ask lambda for an invocation.
- */
- next_outcome get_next();
-
- /**
- * Tells lambda that the function has succeeded.
- */
- post_outcome post_success(std::string const& request_id, invocation_response const& handler_response);
-
- /**
- * Tells lambda that the function has failed.
- */
- post_outcome post_failure(std::string const& request_id, invocation_response const& handler_response);
-
-private:
- void set_curl_next_options();
- void set_curl_post_result_options();
- post_outcome do_post(
- std::string const& url,
- std::string const& request_id,
- invocation_response const& handler_response);
-
-private:
- std::string const m_user_agent_header;
- std::array const m_endpoints;
-};
-
-inline std::chrono::milliseconds invocation_request::get_time_remaining() const
-{
- using namespace std::chrono;
- return duration_cast(deadline - system_clock::now());
-}
-
-// Entry method
-void run_handler(std::function const& handler);
-
-} // namespace lambda_runtime
-} // namespace aws
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h
deleted file mode 100644
index eafcbde76..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#pragma once
-/*
- * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://aws.amazon.com/apache2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-namespace aws {
-namespace lambda_runtime {
-
-/**
- * Returns the major component of the library version.
- */
-unsigned get_version_major();
-
-/**
- * Returns the minor component of the library version.
- */
-unsigned get_version_minor();
-
-/**
- * Returns the patch component of the library version.
- */
-unsigned get_version_patch();
-
-/**
- * Returns the semantic version of the library in the form Major.Minor.Patch
- */
-char const* get_version();
-
-} // namespace lambda_runtime
-} // namespace aws
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h
deleted file mode 100644
index 0b5d0ef96..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#pragma once
-/*
- * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://aws.amazon.com/apache2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-#include
-
-namespace aws {
-namespace logging {
-
-enum class verbosity {
- error,
- info,
- debug,
-};
-
-void log(verbosity v, char const* tag, char const* msg, va_list args);
-
-[[gnu::format(printf, 2, 3)]] inline void log_error(char const* tag, char const* msg, ...)
-{
- va_list args;
- va_start(args, msg);
- log(verbosity::error, tag, msg, args);
- va_end(args);
- (void)tag;
- (void)msg;
-}
-
-[[gnu::format(printf, 2, 3)]] inline void log_info(char const* tag, char const* msg, ...)
-{
-#if AWS_LAMBDA_LOG >= 1
- va_list args;
- va_start(args, msg);
- log(verbosity::info, tag, msg, args);
- va_end(args);
-#else
- (void)tag;
- (void)msg;
-#endif
-}
-
-[[gnu::format(printf, 2, 3)]] inline void log_debug(char const* tag, char const* msg, ...)
-{
-#if AWS_LAMBDA_LOG >= 2
- va_list args;
- va_start(args, msg);
- log(verbosity::debug, tag, msg, args);
- va_end(args);
-#else
- (void)tag;
- (void)msg;
-#endif
-}
-
-} // namespace logging
-} // namespace aws
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager
deleted file mode 100755
index d33389166..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/bin/bash
-# Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License is located at
-#
-# http://aws.amazon.com/apache2.0
-#
-# or in the "license" file accompanying this file. This file is distributed
-# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-# express or implied. See the License for the specific language governing
-# permissions and limitations under the License.
-
-set -euo pipefail
-
-print_help() {
- echo -e "Usage: packager [OPTIONS] \n"
- echo -e "OPTIONS\n"
- echo -e "\t-d,--default-libc\t Use the target host libc libraries. This will not package the C library files.\n"
-}
-
-if [ $# -lt 1 ]; then
- echo -e "Error: missing arguments\n"
- print_help
- exit 1
-fi
-
-POSITIONAL=()
-INCLUDE_LIBC=true
-while [[ $# -gt 0 ]]
-do
- key="$1"
- case $key in
- -d|--default-libc)
- INCLUDE_LIBC=false
- shift # past argument
- ;;
- *) # unknown option
- POSITIONAL+=("$1") # save it in an array for later
- shift # past argument
- ;;
- esac
-done
-set -- "${POSITIONAL[@]}" # restore positional parameters
-
-PKG_BIN_PATH=$1
-
-if [ ! -f "$PKG_BIN_PATH" ]; then
- echo "$PKG_BIN_PATH" - No such file.;
- exit 1;
-fi
-
-if ! type zip > /dev/null 2>&1; then
- echo "zip utility is not found. Please install it and re-run this script"
- exit 1
-fi
-function package_libc_via_pacman {
- if grep --extended-regexp "Arch Linux|Manjaro Linux" < /etc/os-release > /dev/null 2>&1; then
- if type pacman > /dev/null 2>&1; then
- pacman --query --list --quiet glibc | sed -E '/\.so$|\.so\.[0-9]+$/!d'
- fi
- fi
-}
-
-function package_libc_via_dpkg() {
- if type dpkg-query > /dev/null 2>&1; then
- if [[ $(dpkg-query --listfiles libc6 | wc -l) -gt 0 ]]; then
- dpkg-query --listfiles libc6 | sed -E '/\.so$|\.so\.[0-9]+$/!d'
- fi
- fi
-}
-
-function package_libc_via_rpm() {
- if type rpm > /dev/null 2>&1; then
- if [[ $(rpm --query --list glibc.x86_64 | wc -l) -gt 1 ]]; then
- rpm --query --list glibc.x86_64 | sed -E '/\.so$|\.so\.[0-9]+$/!d'
- fi
- fi
-}
-
-# hasElement expects an element and an array parameter
-# it's equivalent to array.contains(element)
-# e.g. hasElement "needle" ${haystack[@]}
-function hasElement() {
- local el key=$1
- shift
- for el in "$@"
- do
- [[ "$el" == "$key" ]] && return 0
- done
- return 1
-}
-
-PKG_BIN_FILENAME=$(basename "$PKG_BIN_PATH")
-PKG_DIR=tmp
-PKG_LD=""
-
-list=$(ldd "$PKG_BIN_PATH" | awk '{print $(NF-1)}')
-libc_libs=()
-libc_libs+=($(package_libc_via_dpkg))
-libc_libs+=($(package_libc_via_rpm))
-libc_libs+=($(package_libc_via_pacman))
-
-mkdir -p "$PKG_DIR/bin" "$PKG_DIR/lib"
-
-for i in $list
-do
- if [[ ! -f $i ]]; then # ignore linux-vdso.so.1
- continue
- fi
-
- # Do not copy libc files which are directly linked unless it's the dynamic loader
- if hasElement "$i" "${libc_libs[@]}"; then
- filename=$(basename "$i")
- if [[ -z "${filename##ld-*}" ]]; then
- PKG_LD=$filename # Use this file as the loader
- cp "$i" "$PKG_DIR/lib"
- fi
- continue
- fi
-
- cp "$i" $PKG_DIR/lib
-done
-
-if [[ $INCLUDE_LIBC == true ]]; then
- for i in "${libc_libs[@]}"
- do
- filename=$(basename "$i")
- if [[ -z "${filename##ld-*}" ]]; then
- # if the loader is empty, then the binary is probably linked to a symlink of the loader. The symlink will
- # not show up when quering the package manager for libc files. So, in this case, we want to copy the loader
- if [[ -z "$PKG_LD" ]]; then
- PKG_LD=$filename
- cp "$i" "$PKG_DIR/lib" # we want to follow the symlink (default behavior)
- fi
- continue # We don't want the dynamic loader's symlink because its target is an absolute path (/lib/ld-*).
- fi
- cp --no-dereference "$i" "$PKG_DIR/lib"
- done
-fi
-
-if [[ -z "$PKG_LD" ]]; then
- echo "Failed to identify, locate or package the loader. Please file an issue on Github!" 1>&2
- exit 1
-fi
-
-bootstrap_script=$(cat < "$PKG_DIR/bootstrap"
-else
- echo -e "$bootstrap_script_no_libc" > "$PKG_DIR/bootstrap"
-fi
-chmod +x "$PKG_DIR/bootstrap"
-# some shenanigans to create the right layout in the zip file without extraneous directories
-pushd "$PKG_DIR" > /dev/null
-zip --symlinks --recurse-paths "$PKG_BIN_FILENAME".zip -- *
-ORIGIN_DIR=$(dirs -l +1)
-mv "$PKG_BIN_FILENAME".zip "$ORIGIN_DIR"
-popd > /dev/null
-rm -r "$PKG_DIR"
-echo Created "$ORIGIN_DIR/$PKG_BIN_FILENAME".zip
-
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp
deleted file mode 100644
index cc64abdbc..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Pick your poison.
-//
-// On GNU/Linux, you have few choices to get the most out of your stack trace.
-//
-// By default you get:
-// - object filename
-// - function name
-//
-// In order to add:
-// - source filename
-// - line and column numbers
-// - source code snippet (assuming the file is accessible)
-
-// Install one of the following library then uncomment one of the macro (or
-// better, add the detection of the lib and the macro definition in your build
-// system)
-
-// - apt-get install libdw-dev ...
-// - g++/clang++ -ldw ...
-// #define BACKWARD_HAS_DW 1
-
-// - apt-get install binutils-dev ...
-// - g++/clang++ -lbfd ...
-// #define BACKWARD_HAS_BFD 1
-
-#include "backward.h"
-
-namespace backward {
-
-backward::SignalHandling sh;
-
-} // namespace backward
diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h
deleted file mode 100644
index e9e56c798..000000000
--- a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h
+++ /dev/null
@@ -1,4291 +0,0 @@
-// clang-format off
-/*
- * backward.hpp
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef H_6B9572DA_A64B_49E6_B234_051480991C89
-#define H_6B9572DA_A64B_49E6_B234_051480991C89
-
-#ifndef __cplusplus
-# error "It's not going to compile without a C++ compiler..."
-#endif
-
-#if defined(BACKWARD_CXX11)
-#elif defined(BACKWARD_CXX98)
-#else
-# if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
-# define BACKWARD_CXX11
-# define BACKWARD_ATLEAST_CXX11
-# define BACKWARD_ATLEAST_CXX98
-# else
-# define BACKWARD_CXX98
-# define BACKWARD_ATLEAST_CXX98
-# endif
-#endif
-
-// You can define one of the following (or leave it to the auto-detection):
-//
-// #define BACKWARD_SYSTEM_LINUX
-// - specialization for linux
-//
-// #define BACKWARD_SYSTEM_DARWIN
-// - specialization for Mac OS X 10.5 and later.
-//
-// #define BACKWARD_SYSTEM_UNKNOWN
-// - placebo implementation, does nothing.
-//
-#if defined(BACKWARD_SYSTEM_LINUX)
-#elif defined(BACKWARD_SYSTEM_DARWIN)
-#elif defined(BACKWARD_SYSTEM_UNKNOWN)
-#elif defined(BACKWARD_SYSTEM_WINDOWS)
-#else
-# if defined(__linux) || defined(__linux__)
-# define BACKWARD_SYSTEM_LINUX
-# elif defined(__APPLE__)
-# define BACKWARD_SYSTEM_DARWIN
-# elif defined(_WIN32)
-# define BACKWARD_SYSTEM_WINDOWS
-# else
-# define BACKWARD_SYSTEM_UNKNOWN
-# endif
-#endif
-
-#define NOINLINE __attribute__((noinline))
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#if defined(BACKWARD_SYSTEM_LINUX)
-
-// On linux, backtrace can back-trace or "walk" the stack using the following
-// libraries:
-//
-// #define BACKWARD_HAS_UNWIND 1
-// - unwind comes from libgcc, but I saw an equivalent inside clang itself.
-// - with unwind, the stacktrace is as accurate as it can possibly be, since
-// this is used by the C++ runtine in gcc/clang for stack unwinding on
-// exception.
-// - normally libgcc is already linked to your program by default.
-//
-// #define BACKWARD_HAS_BACKTRACE == 1
-// - backtrace seems to be a little bit more portable than libunwind, but on
-// linux, it uses unwind anyway, but abstract away a tiny information that is
-// sadly really important in order to get perfectly accurate stack traces.
-// - backtrace is part of the (e)glib library.
-//
-// The default is:
-// #define BACKWARD_HAS_UNWIND == 1
-//
-// Note that only one of the define should be set to 1 at a time.
-//
-# if BACKWARD_HAS_UNWIND == 1
-# elif BACKWARD_HAS_BACKTRACE == 1
-# else
-# undef BACKWARD_HAS_UNWIND
-# define BACKWARD_HAS_UNWIND 1
-# undef BACKWARD_HAS_BACKTRACE
-# define BACKWARD_HAS_BACKTRACE 0
-# endif
-
-// On linux, backward can extract detailed information about a stack trace
-// using one of the following libraries:
-//
-// #define BACKWARD_HAS_DW 1
-// - libdw gives you the most juicy details out of your stack traces:
-// - object filename
-// - function name
-// - source filename
-// - line and column numbers
-// - source code snippet (assuming the file is accessible)
-// - variables name and values (if not optimized out)
-// - You need to link with the lib "dw":
-// - apt-get install libdw-dev
-// - g++/clang++ -ldw ...
-//
-// #define BACKWARD_HAS_BFD 1
-// - With libbfd, you get a fair amount of details:
-// - object filename
-// - function name
-// - source filename
-// - line numbers
-// - source code snippet (assuming the file is accessible)
-// - You need to link with the lib "bfd":
-// - apt-get install binutils-dev
-// - g++/clang++ -lbfd ...
-//
-// #define BACKWARD_HAS_DWARF 1
-// - libdwarf gives you the most juicy details out of your stack traces:
-// - object filename
-// - function name
-// - source filename
-// - line and column numbers
-// - source code snippet (assuming the file is accessible)
-// - variables name and values (if not optimized out)
-// - You need to link with the lib "dwarf":
-// - apt-get install libdwarf-dev
-// - g++/clang++ -ldwarf ...
-//
-// #define BACKWARD_HAS_BACKTRACE_SYMBOL 1
-// - backtrace provides minimal details for a stack trace:
-// - object filename
-// - function name
-// - backtrace is part of the (e)glib library.
-//
-// The default is:
-// #define BACKWARD_HAS_BACKTRACE_SYMBOL == 1
-//
-// Note that only one of the define should be set to 1 at a time.
-//
-# if BACKWARD_HAS_DW == 1
-# elif BACKWARD_HAS_BFD == 1
-# elif BACKWARD_HAS_DWARF == 1
-# elif BACKWARD_HAS_BACKTRACE_SYMBOL == 1
-# else
-# undef BACKWARD_HAS_DW
-# define BACKWARD_HAS_DW 0
-# undef BACKWARD_HAS_BFD
-# define BACKWARD_HAS_BFD 0
-# undef BACKWARD_HAS_DWARF
-# define BACKWARD_HAS_DWARF 0
-# undef BACKWARD_HAS_BACKTRACE_SYMBOL
-# define BACKWARD_HAS_BACKTRACE_SYMBOL 1
-# endif
-
-# include
-# include
-# ifdef __ANDROID__
-// Old Android API levels define _Unwind_Ptr in both link.h and
-// unwind.h Rename the one in link.h as we are not going to be using
-// it
-# define _Unwind_Ptr _Unwind_Ptr_Custom
-# include
-# undef _Unwind_Ptr
-# else
-# include
-# endif
-# include
-# include
-# include
-# include
-
-# if BACKWARD_HAS_BFD == 1
-// NOTE: defining PACKAGE{,_VERSION} is required before including
-// bfd.h on some platforms, see also:
-// https://sourceware.org/bugzilla/show_bug.cgi?id=14243
-# ifndef PACKAGE
-# define PACKAGE
-# endif
-# ifndef PACKAGE_VERSION
-# define PACKAGE_VERSION
-# endif
-# include
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# include
-# undef _GNU_SOURCE
-# else
-# include
-# endif
-# endif
-
-# if BACKWARD_HAS_DW == 1
-# include
-# include
-# include
-# endif
-
-# if BACKWARD_HAS_DWARF == 1
-# include
-# include
-# include
-# include
-# include