diff --git a/sample-apps/example-csharp/ExampleCS/src/ExampleCS/ExampleCS.csproj b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/ExampleCS.csproj
new file mode 100644
index 00000000..a57cd339
--- /dev/null
+++ b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/ExampleCS.csproj
@@ -0,0 +1,18 @@
+
+
+ net8.0
+ enable
+ enable
+ true
+ Lambda
+
+ true
+
+ true
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample-apps/example-csharp/ExampleCS/src/ExampleCS/Function.cs b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/Function.cs
new file mode 100644
index 00000000..b1142dba
--- /dev/null
+++ b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/Function.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Text;
+using System.Threading.Tasks;
+using Amazon.Lambda.Core;
+using Amazon.S3;
+using Amazon.S3.Model;
+
+// Assembly attribute to enable Lambda function logging
+[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
+
+namespace ExampleLambda;
+
+public class Order
+{
+ public string OrderId { get; set; } = string.Empty;
+ public double Amount { get; set; }
+ public string Item { get; set; } = string.Empty;
+}
+
+public class OrderHandler
+{
+ private static readonly AmazonS3Client s3Client = new();
+
+ public async Task HandleRequest(Order order, ILambdaContext context)
+ {
+ try
+ {
+ string? bucketName = Environment.GetEnvironmentVariable("RECEIPT_BUCKET");
+ if (string.IsNullOrWhiteSpace(bucketName))
+ {
+ throw new ArgumentException("RECEIPT_BUCKET environment variable is not set");
+ }
+
+ string receiptContent = $"OrderID: {order.OrderId}\nAmount: ${order.Amount:F2}\nItem: {order.Item}";
+ string key = $"receipts/{order.OrderId}.txt";
+
+ await UploadReceiptToS3(bucketName, key, receiptContent);
+
+ context.Logger.LogInformation($"Successfully processed order {order.OrderId} and stored receipt in S3 bucket {bucketName}");
+ return "Success";
+ }
+ catch (Exception ex)
+ {
+ context.Logger.LogError($"Failed to process order: {ex.Message}");
+ throw;
+ }
+ }
+
+ private async Task UploadReceiptToS3(string bucketName, string key, string receiptContent)
+ {
+ try
+ {
+ var putRequest = new PutObjectRequest
+ {
+ BucketName = bucketName,
+ Key = key,
+ ContentBody = receiptContent,
+ ContentType = "text/plain"
+ };
+
+ await s3Client.PutObjectAsync(putRequest);
+ }
+ catch (AmazonS3Exception ex)
+ {
+ throw new Exception($"Failed to upload receipt to S3: {ex.Message}", ex);
+ }
+ }
+}
diff --git a/sample-apps/example-csharp/ExampleCS/src/ExampleCS/Readme.md b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/Readme.md
new file mode 100644
index 00000000..422393ec
--- /dev/null
+++ b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/Readme.md
@@ -0,0 +1,49 @@
+# AWS Lambda Empty Function Project
+
+This starter project consists of:
+* Function.cs - class file containing a class with a single function handler method
+* aws-lambda-tools-defaults.json - default argument settings for use with Visual Studio and command line deployment tools for AWS
+
+You may also have a test project depending on the options selected.
+
+The generated function handler is a simple method accepting a string argument that returns the uppercase equivalent of the input string. Replace the body of this method, and parameters, to suit your needs.
+
+## Here are some steps to follow from Visual Studio:
+
+To deploy your function to AWS Lambda, right click the project in Solution Explorer and select *Publish to AWS Lambda*.
+
+To view your deployed function open its Function View window by double-clicking the function name shown beneath the AWS Lambda node in the AWS Explorer tree.
+
+To perform testing against your deployed function use the Test Invoke tab in the opened Function View window.
+
+To configure event sources for your deployed function, for example to have your function invoked when an object is created in an Amazon S3 bucket, use the Event Sources tab in the opened Function View window.
+
+To update the runtime configuration of your deployed function use the Configuration tab in the opened Function View window.
+
+To view execution logs of invocations of your function use the Logs tab in the opened Function View window.
+
+## Here are some steps to follow to get started from the command line:
+
+Once you have edited your template and code you can deploy your application using the [Amazon.Lambda.Tools Global Tool](https://github.com/aws/aws-extensions-for-dotnet-cli#aws-lambda-amazonlambdatools) from the command line.
+
+Install Amazon.Lambda.Tools Global Tools if not already installed.
+```
+ dotnet tool install -g Amazon.Lambda.Tools
+```
+
+If already installed check if new version is available.
+```
+ dotnet tool update -g Amazon.Lambda.Tools
+```
+
+Execute unit tests
+```
+ cd "ExampleCS/test/ExampleCS.Tests"
+ dotnet test
+```
+
+Deploy function to AWS Lambda
+```
+ cd "ExampleCS/src/ExampleCS"
+ dotnet lambda deploy-function
+```
diff --git a/sample-apps/example-csharp/ExampleCS/src/ExampleCS/aws-lambda-tools-defaults.json b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/aws-lambda-tools-defaults.json
new file mode 100644
index 00000000..a9757798
--- /dev/null
+++ b/sample-apps/example-csharp/ExampleCS/src/ExampleCS/aws-lambda-tools-defaults.json
@@ -0,0 +1,16 @@
+{
+ "Information": [
+ "This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.",
+ "To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.",
+ "dotnet lambda help",
+ "All the command line options for the Lambda command can be specified in this file."
+ ],
+ "profile": "default",
+ "region": "us-east-1",
+ "configuration": "Release",
+ "function-architecture": "x86_64",
+ "function-runtime": "dotnet8",
+ "function-memory-size": 512,
+ "function-timeout": 30,
+ "function-handler": "ExampleCS::ExampleLambda.OrderHandler::HandleRequest"
+}
\ No newline at end of file
diff --git a/sample-apps/example-csharp/ExampleCS/test/ExampleCS.Tests/ExampleCS.Tests.csproj b/sample-apps/example-csharp/ExampleCS/test/ExampleCS.Tests/ExampleCS.Tests.csproj
new file mode 100644
index 00000000..4aa7182a
--- /dev/null
+++ b/sample-apps/example-csharp/ExampleCS/test/ExampleCS.Tests/ExampleCS.Tests.csproj
@@ -0,0 +1,18 @@
+
+
+ net8.0
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample-apps/example-csharp/ExampleCS/test/ExampleCS.Tests/FunctionTest.cs b/sample-apps/example-csharp/ExampleCS/test/ExampleCS.Tests/FunctionTest.cs
new file mode 100644
index 00000000..07640759
--- /dev/null
+++ b/sample-apps/example-csharp/ExampleCS/test/ExampleCS.Tests/FunctionTest.cs
@@ -0,0 +1,20 @@
+using Xunit;
+using Amazon.Lambda.Core;
+using Amazon.Lambda.TestUtilities;
+
+namespace ExampleCS.Tests;
+
+public class FunctionTest
+{
+ [Fact]
+ public void TestToUpperFunction()
+ {
+
+ // Invoke the lambda function and confirm the string was upper cased.
+ var function = new Function();
+ var context = new TestLambdaContext();
+ var upperCase = function.FunctionHandler("hello world", context);
+
+ Assert.Equal("HELLO WORLD", upperCase);
+ }
+}
diff --git a/sample-apps/java-events-v1sdk/1-create-bucket.sh b/sample-apps/java-events-v1sdk/1-create-bucket.sh
deleted file mode 100755
index 64a5f749..00000000
--- a/sample-apps/java-events-v1sdk/1-create-bucket.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \t\n')
-BUCKET_NAME=lambda-artifacts-$BUCKET_ID
-echo $BUCKET_NAME > bucket-name.txt
-aws s3 mb s3://$BUCKET_NAME
diff --git a/sample-apps/java-events-v1sdk/2-build-layer.sh b/sample-apps/java-events-v1sdk/2-build-layer.sh
deleted file mode 100755
index 9f038396..00000000
--- a/sample-apps/java-events-v1sdk/2-build-layer.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-gradle -q packageLibs
-mv build/distributions/java-events-v1sdk.zip build/java-events-v1sdk-lib.zip
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/3-deploy.sh b/sample-apps/java-events-v1sdk/3-deploy.sh
deleted file mode 100755
index 5ce8d160..00000000
--- a/sample-apps/java-events-v1sdk/3-deploy.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-ARTIFACT_BUCKET=$(cat bucket-name.txt)
-TEMPLATE=template.yml
-if [ $1 ]
-then
- if [ $1 = mvn ]
- then
- TEMPLATE=template-mvn.yml
- mvn package
- fi
-else
- gradle build -i
-fi
-aws cloudformation package --template-file $TEMPLATE --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
-aws cloudformation deploy --template-file out.yml --stack-name java-events-v1sdk --capabilities CAPABILITY_NAMED_IAM
diff --git a/sample-apps/java-events-v1sdk/4-invoke.sh b/sample-apps/java-events-v1sdk/4-invoke.sh
deleted file mode 100755
index 05ddd9f8..00000000
--- a/sample-apps/java-events-v1sdk/4-invoke.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-FUNCTION=$(aws cloudformation describe-stack-resource --stack-name java-events-v1sdk --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text)
-if [ $1 ]
-then
- case $1 in
- ddb)
- PAYLOAD='fileb://events/dynamodb-record.json'
- ;;
- kin)
- PAYLOAD='fileb://events/kinesis-record.json'
- ;;
- *)
- echo -n "Unknown event type"
- ;;
- esac
-fi
-while true; do
- if [ $PAYLOAD ]
- then
- aws lambda invoke --function-name $FUNCTION --payload $PAYLOAD out.json
- else
- aws lambda invoke --function-name $FUNCTION --payload fileb://event.json out.json
- fi
- cat out.json
- echo ""
- sleep 2
-done
diff --git a/sample-apps/java-events-v1sdk/5-cleanup.sh b/sample-apps/java-events-v1sdk/5-cleanup.sh
deleted file mode 100755
index 79b326e4..00000000
--- a/sample-apps/java-events-v1sdk/5-cleanup.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-STACK=java-events-v1sdk
-if [[ $# -eq 1 ]] ; then
- STACK=$1
- echo "Deleting stack $STACK"
-fi
-FUNCTION=$(aws cloudformation describe-stack-resource --stack-name $STACK --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text)
-aws cloudformation delete-stack --stack-name $STACK
-echo "Deleted $STACK stack."
-
-if [ -f bucket-name.txt ]; then
- ARTIFACT_BUCKET=$(cat bucket-name.txt)
- if [[ ! $ARTIFACT_BUCKET =~ lambda-artifacts-[a-z0-9]{16} ]] ; then
- echo "Bucket was not created by this application. Skipping."
- else
- while true; do
- read -p "Delete deployment artifacts and bucket ($ARTIFACT_BUCKET)? (y/n)" response
- case $response in
- [Yy]* ) aws s3 rb --force s3://$ARTIFACT_BUCKET; rm bucket-name.txt; break;;
- [Nn]* ) break;;
- * ) echo "Response must start with y or n.";;
- esac
- done
- fi
-fi
-
-while true; do
- read -p "Delete function log group (/aws/lambda/$FUNCTION)? (y/n)" response
- case $response in
- [Yy]* ) aws logs delete-log-group --log-group-name /aws/lambda/$FUNCTION; break;;
- [Nn]* ) break;;
- * ) echo "Response must start with y or n.";;
- esac
-done
-
-rm -f out.yml out.json
-rm -rf build .gradle target
diff --git a/sample-apps/java-events-v1sdk/README.md b/sample-apps/java-events-v1sdk/README.md
deleted file mode 100644
index 6405882d..00000000
--- a/sample-apps/java-events-v1sdk/README.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Basic function with event library types and the AWS SDK (Java)
-
-This sample application shows the use of the `aws-lambda-java-events` library with event types that require AWS SDK as a dependency. A separate handler class is defined for each input type. For other event types (which don't require the AWS SDK), see the `java-events` sample.
-
-**Note: The `java-events-v1sdk` examples are deprecated.** As of version 3.0.0 of the `aws-lambda-java-events` package, [users are no longer required to pull in SDK dependencies in order to use that library](https://github.com/aws/aws-lambda-java-libs/tree/master/aws-lambda-java-events). Please see the [`java-events` package](https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/sample-apps/java-events) for updated examples.
-
-
-
-The project includes function code and supporting resources:
-- `src/main` - A Java function.
-- `src/test` - A unit test and helper classes.
-- `template.yml` - An AWS CloudFormation template that creates an application.
-- `build.gradle` - A Gradle build file.
-- `pom.xml` - A Maven build file.
-- `1-create-bucket.sh`, `2-build-layer.sh`, etc. - Shell scripts that use the AWS CLI to deploy and manage the application.
-
-Use the following instructions to deploy the sample application.
-
-# Requirements
-- [Java 8 runtime environment (SE JRE)](https://www.oracle.com/java/technologies/javase-downloads.html)
-- [Gradle 5](https://gradle.org/releases/) or [Maven 3](https://maven.apache.org/docs/history.html)
-- The Bash shell. For Linux and macOS, this is included by default. In Windows 10, you can install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to get a Windows-integrated version of Ubuntu and Bash.
-- [The AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) v1.17 or newer.
-
-# Setup
-Download or clone this repository.
-
- $ git clone https://github.com/awsdocs/aws-lambda-developer-guide.git
- $ cd aws-lambda-developer-guide/sample-apps/java-events-v1sdk
-
-Run `1-create-bucket.sh` to create a new bucket for deployment artifacts.
-
- java-events-v1sdk$ ./1-create-bucket.sh
- make_bucket: lambda-artifacts-a5e4xmplb5b22e0d
-
-To build a Lambda layer that contains the function's runtime dependencies, run `2-build-layer.sh`. Packaging dependencies in a layer reduces the size of the deployment package that you upload when you modify your code.
-
- java-events-v1sdk$ ./2-build-layer.sh
-
-# Deploy
-Run `3-deploy.sh` to build the application with Gradle and deploy it.
-
- java-events-v1sdk$ ./3-deploy.sh
- BUILD SUCCESSFUL in 1s
- Successfully packaged artifacts and wrote output template to file out.yml.
- Waiting for changeset to be created..
- Successfully created/updated stack - java-events-v1sdk
-
-This script uses AWS CloudFormation to deploy the Lambda functions and an IAM role. If the AWS CloudFormation stack that contains the resources already exists, the script updates it with any changes to the template or function code.
-
-You can also build the application with Maven. To use maven, add `mvn` to the command.
-
- java-events-v1sdk$ ./3-deploy.sh mvn
- [INFO] Scanning for projects...
- [INFO] -----------------------< com.example:java-events-v1sdk >-----------------------
- [INFO] Building java-events-v1sdk-function 1.0-SNAPSHOT
- [INFO] --------------------------------[ jar ]---------------------------------
- ...
-
-# Test
-Run `4-invoke.sh` to invoke the function.
-
- java-events-v1sdk$ ./4-invoke.sh
- {
- "StatusCode": 200,
- "ExecutedVersion": "$LATEST"
- }
- "200 OK"
-
-Let the script invoke the function a few times and then press `CRTL+C` to exit.
-
-The application uses AWS X-Ray to trace requests. Open the [X-Ray console](https://console.aws.amazon.com/xray/home#/service-map) to view the service map.
-
-
-
-Choose a node in the main function graph. Then choose **View traces** to see a list of traces. Choose any trace to view a timeline that breaks down the work done by the function.
-
-
-
-# Configure Handler Class
-
-By default, the function uses a handler class named `Handler` that takes an Amazon S3 notification event as input and returns a string. The project also includes handlers that use other input and output types. The handlers are defined in the following files under `src/main/java/example`:
-
-- `Handler.java` - Takes `S3Event` as input.
-- `HandlerDynamoDB.java` - Takes `DynamoDBEvent` as input.
-- `HandlerKinesis.java` - Takes `KinesisEvent` as input.
-
-To use a different handler, change the value of the Handler setting in the application template (`template.yml` or `template-mvn.yaml`). For example, to use the Kinesis handler:
-
- Properties:
- CodeUri: build/distributions/java-events-v1sdk.zip
- Handler: example.HandlerKinesis
-
-Deploy the change, and then use the invoke script to test the new configuration. Pass the handler type key as an argument to the invoke script.
-
- ./4-invoke.sh kin
- {
- "StatusCode": 200,
- "ExecutedVersion": "$LATEST"
- }
- "200 OK"
-
-The following event type keys are supported:
-- none - S3 notification (`events/s3-notification.json`)
-- `kin` - Kinesis record (`events/kinesis-record.json`)
-- `ddb` - DynamoDB record (`events/dynamodb-record.json`)
-
-# Cleanup
-To delete the application, run `5-cleanup.sh`.
-
- java-events-v1sdk$ ./5-cleanup.sh
diff --git a/sample-apps/java-events-v1sdk/build.gradle b/sample-apps/java-events-v1sdk/build.gradle
deleted file mode 100644
index abf8b34c..00000000
--- a/sample-apps/java-events-v1sdk/build.gradle
+++ /dev/null
@@ -1,56 +0,0 @@
-plugins {
- id 'java'
-}
-
-repositories {
- mavenCentral()
-}
-
-dependencies {
- implementation platform('com.amazonaws:aws-xray-recorder-sdk-bom:2.4.0')
- implementation 'com.amazonaws:aws-lambda-java-core:1.2.1'
- implementation 'com.amazonaws:aws-lambda-java-events:2.2.9'
- implementation 'com.amazonaws:aws-java-sdk-s3:1.12.261'
- implementation 'com.amazonaws:aws-java-sdk-kinesis:1.11.578'
- implementation 'com.amazonaws:aws-java-sdk-dynamodb:1.11.578'
- implementation 'com.amazonaws:aws-xray-recorder-sdk-core'
- implementation 'com.amazonaws:aws-xray-recorder-sdk-aws-sdk'
- implementation 'com.amazonaws:aws-xray-recorder-sdk-aws-sdk-instrumentor'
- implementation 'com.google.code.gson:gson:2.8.9'
- implementation 'org.apache.logging.log4j:log4j-api:[2.17.1,)'
- implementation 'org.apache.logging.log4j:log4j-core:[2.17.1,)'
- implementation 'org.apache.logging.log4j:log4j-slf4j18-impl:[2.17.1,)'
- runtimeOnly 'com.amazonaws:aws-lambda-java-log4j2:1.5.0'
- testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
- testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
-}
-
-test {
- useJUnitPlatform()
-}
-
-task packageBig(type: Zip) {
- from compileJava
- from processResources
- into('lib') {
- from configurations.runtimeClasspath
- }
-}
-
-task packageLibs(type: Zip) {
- into('java/lib') {
- from configurations.runtimeClasspath
- }
-}
-
-task packageSmall(type: Zip) {
- from compileJava
- from processResources
-}
-
-java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
-}
-
-build.dependsOn packageSmall
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/event.json b/sample-apps/java-events-v1sdk/event.json
deleted file mode 100644
index 94c28f5c..00000000
--- a/sample-apps/java-events-v1sdk/event.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "Records": [
- {
- "awsRegion": "us-east-2",
- "eventName": "ObjectCreated:Put",
- "eventSource": "aws:s3",
- "eventTime": "2020-03-08T00:30:12.456Z",
- "eventVersion": "2.1",
- "requestParameters": {
- "sourceIPAddress": "174.255.255.156"
- },
- "responseElements": {
- "xAmzId2": "nBbLJPAHhdvxmplPvtCgTrWCqf/KtonyV93l9rcoMLeIWJxpS9x9P8u01+Tj0OdbAoGs+VGvEvWl/Sg1NW5uEsVO25Laq7L",
- "xAmzRequestId": "AF2D7AB6002E898D"
- },
- "s3": {
- "configurationId": "682bbb7a-xmpl-48ca-94b1-7f77c4d6dbf0",
- "bucket": {
- "name": "BUCKET_NAME",
- "ownerIdentity": {
- "principalId": "A3XMPLFAF2AI3E"
- },
- "arn": "arn:aws:s3:::BUCKET_NAME"
- },
- "object": {
- "key": "inbound/sample-java-s3.png",
- "size": 21476,
- "eTag": "d132690b6c65b6d1629721dcfb49b883",
- "versionId": "",
- "sequencer": "005E64A65DF093B26D"
- },
- "s3SchemaVersion": "1.0"
- },
- "userIdentity": {
- "principalId": "AWS:AIDAINPONIXMPLT3IKHL2"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/events/dynamodb-record.json b/sample-apps/java-events-v1sdk/events/dynamodb-record.json
deleted file mode 100644
index 74a055e8..00000000
--- a/sample-apps/java-events-v1sdk/events/dynamodb-record.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "Records": [
- {
- "eventID": "1",
- "eventVersion": "1.0",
- "dynamodb": {
- "Keys": {
- "Id": {
- "N": "101"
- }
- },
- "NewImage": {
- "Message": {
- "S": "New item!"
- },
- "Id": {
- "N": "101"
- }
- },
- "StreamViewType": "NEW_AND_OLD_IMAGES",
- "SequenceNumber": "111",
- "SizeBytes": 26
- },
- "awsRegion": "us-west-2",
- "eventName": "INSERT",
- "eventSourceARN": "eventsourcearn",
- "eventSource": "aws:dynamodb"
- },
- {
- "eventID": "2",
- "eventVersion": "1.0",
- "dynamodb": {
- "OldImage": {
- "Message": {
- "S": "New item!"
- },
- "Id": {
- "N": "101"
- }
- },
- "SequenceNumber": "222",
- "Keys": {
- "Id": {
- "N": "101"
- }
- },
- "SizeBytes": 59,
- "NewImage": {
- "Message": {
- "S": "This item has changed"
- },
- "Id": {
- "N": "101"
- }
- },
- "StreamViewType": "NEW_AND_OLD_IMAGES"
- },
- "awsRegion": "us-west-2",
- "eventName": "MODIFY",
- "eventSourceARN": "sourcearn",
- "eventSource": "aws:dynamodb"
- }
- ]
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/events/kinesis-record.json b/sample-apps/java-events-v1sdk/events/kinesis-record.json
deleted file mode 100644
index 8bc3e069..00000000
--- a/sample-apps/java-events-v1sdk/events/kinesis-record.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "Records": [
- {
- "kinesis": {
- "kinesisSchemaVersion": "1.0",
- "partitionKey": "1",
- "sequenceNumber": "49590338271490256608559692538361571095921575989136588898",
- "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==",
- "approximateArrivalTimestamp": 1545084650.987
- },
- "eventSource": "aws:kinesis",
- "eventVersion": "1.0",
- "eventID": "shardId-000000000006:49590338271490256608559692538361571095921575989136588898",
- "eventName": "aws:kinesis:record",
- "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role",
- "awsRegion": "us-east-2",
- "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream"
- },
- {
- "kinesis": {
- "kinesisSchemaVersion": "1.0",
- "partitionKey": "1",
- "sequenceNumber": "49590338271490256608559692540925702759324208523137515618",
- "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=",
- "approximateArrivalTimestamp": 1545084711.166
- },
- "eventSource": "aws:kinesis",
- "eventVersion": "1.0",
- "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618",
- "eventName": "aws:kinesis:record",
- "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role",
- "awsRegion": "us-east-2",
- "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream"
- }
- ]
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/events/s3-notification.json b/sample-apps/java-events-v1sdk/events/s3-notification.json
deleted file mode 100644
index 94c28f5c..00000000
--- a/sample-apps/java-events-v1sdk/events/s3-notification.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "Records": [
- {
- "awsRegion": "us-east-2",
- "eventName": "ObjectCreated:Put",
- "eventSource": "aws:s3",
- "eventTime": "2020-03-08T00:30:12.456Z",
- "eventVersion": "2.1",
- "requestParameters": {
- "sourceIPAddress": "174.255.255.156"
- },
- "responseElements": {
- "xAmzId2": "nBbLJPAHhdvxmplPvtCgTrWCqf/KtonyV93l9rcoMLeIWJxpS9x9P8u01+Tj0OdbAoGs+VGvEvWl/Sg1NW5uEsVO25Laq7L",
- "xAmzRequestId": "AF2D7AB6002E898D"
- },
- "s3": {
- "configurationId": "682bbb7a-xmpl-48ca-94b1-7f77c4d6dbf0",
- "bucket": {
- "name": "BUCKET_NAME",
- "ownerIdentity": {
- "principalId": "A3XMPLFAF2AI3E"
- },
- "arn": "arn:aws:s3:::BUCKET_NAME"
- },
- "object": {
- "key": "inbound/sample-java-s3.png",
- "size": 21476,
- "eTag": "d132690b6c65b6d1629721dcfb49b883",
- "versionId": "",
- "sequencer": "005E64A65DF093B26D"
- },
- "s3SchemaVersion": "1.0"
- },
- "userIdentity": {
- "principalId": "AWS:AIDAINPONIXMPLT3IKHL2"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/images/java-events-v1sdk-servicemap.png b/sample-apps/java-events-v1sdk/images/java-events-v1sdk-servicemap.png
deleted file mode 100644
index 72afcfdb..00000000
Binary files a/sample-apps/java-events-v1sdk/images/java-events-v1sdk-servicemap.png and /dev/null differ
diff --git a/sample-apps/java-events-v1sdk/images/java-events-v1sdk-trace.png b/sample-apps/java-events-v1sdk/images/java-events-v1sdk-trace.png
deleted file mode 100644
index 4f921833..00000000
Binary files a/sample-apps/java-events-v1sdk/images/java-events-v1sdk-trace.png and /dev/null differ
diff --git a/sample-apps/java-events-v1sdk/images/sample-java-events-v1sdk.png b/sample-apps/java-events-v1sdk/images/sample-java-events-v1sdk.png
deleted file mode 100644
index 84349fbb..00000000
Binary files a/sample-apps/java-events-v1sdk/images/sample-java-events-v1sdk.png and /dev/null differ
diff --git a/sample-apps/java-events-v1sdk/pom.xml b/sample-apps/java-events-v1sdk/pom.xml
deleted file mode 100644
index 14683a39..00000000
--- a/sample-apps/java-events-v1sdk/pom.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-
- 4.0.0
- com.example
- java-events-v1sdk
- jar
- 1.0-SNAPSHOT
- java-events-v1sdk-function
-
- UTF-8
- 1.8
- 1.8
-
-
-
- com.amazonaws
- aws-lambda-java-core
- 1.2.1
-
-
- com.amazonaws
- aws-lambda-java-events
- 2.2.9
-
-
- com.amazonaws
- aws-lambda-java-log4j2
- 1.5.0
-
-
- com.google.code.gson
- gson
- 2.8.9
-
-
- org.apache.logging.log4j
- log4j-api
- [2.17.1,)
-
-
- org.apache.logging.log4j
- log4j-core
- [2.17.1,)
-
-
- org.apache.logging.log4j
- log4j-slf4j18-impl
- [2.17.1,)
-
-
- com.amazonaws
- aws-java-sdk-s3
- 1.12.261
-
-
- com.amazonaws
- aws-java-sdk-kinesis
- 1.11.578
-
-
- com.amazonaws
- aws-java-sdk-dynamodb
- 1.11.578
-
-
- com.amazonaws
- aws-xray-recorder-sdk-aws-sdk-core
- 2.4.0
-
-
- com.amazonaws
- aws-xray-recorder-sdk-aws-sdk
- 2.4.0
-
-
- com.amazonaws
- aws-xray-recorder-sdk-aws-sdk-instrumentor
- 2.4.0
-
-
- org.junit.jupiter
- junit-jupiter-api
- 5.6.0
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- 5.6.0
- test
-
-
-
-
-
-
- maven-surefire-plugin
- 2.22.2
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 3.2.2
-
- false
-
-
-
- package
-
- shade
-
-
-
-
-
-
-
-
-
-
-
- com.github.edwgiz
- maven-shade-plugin.log4j2-cachefile-transformer
- [2.17.1,)
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.8.1
-
- 1.8
- 1.8
-
-
-
-
-
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/main/java/example/Handler.java b/sample-apps/java-events-v1sdk/src/main/java/example/Handler.java
deleted file mode 100644
index 6ec8c54d..00000000
--- a/sample-apps/java-events-v1sdk/src/main/java/example/Handler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package example;
-
-import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.RequestHandler;
-import com.amazonaws.services.lambda.runtime.events.S3Event;
-
-import com.amazonaws.services.s3.event.S3EventNotification.S3EventNotificationRecord;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-// Handler value: example.Handler
-public class Handler implements RequestHandler{
- private static final Logger logger = LoggerFactory.getLogger(Handler.class);
- Gson gson = new GsonBuilder().setPrettyPrinting().create();
- @Override
- public String handleRequest(S3Event event, Context context)
- {
- String response = new String("200 OK");
- S3EventNotificationRecord record = event.getRecords().get(0);
- String srcBucket = record.getS3().getBucket().getName();
- // Object key may have spaces or unicode non-ASCII characters.
- String srcKey = record.getS3().getObject().getUrlDecodedKey();
- logger.info("RECORD: " + record);
- logger.info("SOURCE BUCKET: " + srcBucket);
- logger.info("SOURCE KEY: " + srcKey);
- // log execution details
- Util.logEnvironment(event, context, gson);
- return response;
- }
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/main/java/example/HandlerDynamoDB.java b/sample-apps/java-events-v1sdk/src/main/java/example/HandlerDynamoDB.java
deleted file mode 100644
index da0c0281..00000000
--- a/sample-apps/java-events-v1sdk/src/main/java/example/HandlerDynamoDB.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package example;
-
-import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.RequestHandler;
-import com.amazonaws.services.lambda.runtime.events.DynamodbEvent;
-import com.amazonaws.services.lambda.runtime.events.DynamodbEvent.DynamodbStreamRecord;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-// Handler value: example.HandlerDynamoDB
-public class HandlerDynamoDB implements RequestHandler{
- private static final Logger logger = LoggerFactory.getLogger(HandlerDynamoDB.class);
- Gson gson = new GsonBuilder().setPrettyPrinting().create();
- @Override
- public String handleRequest(DynamodbEvent event, Context context)
- {
- String response = new String("200 OK");
- for (DynamodbStreamRecord record : event.getRecords()){
- logger.info(record.getEventID());
- logger.info(record.getEventName());
- logger.info(record.getDynamodb().toString());
- }
- logger.info("Successfully processed " + event.getRecords().size() + " records.");
- // log execution details
- Util.logEnvironment(event, context, gson);
- return response;
- }
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/main/java/example/HandlerKinesis.java b/sample-apps/java-events-v1sdk/src/main/java/example/HandlerKinesis.java
deleted file mode 100644
index e46720df..00000000
--- a/sample-apps/java-events-v1sdk/src/main/java/example/HandlerKinesis.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package example;
-
-import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.RequestHandler;
-import com.amazonaws.services.lambda.runtime.events.KinesisEvent;
-import com.amazonaws.services.lambda.runtime.events.KinesisEvent.KinesisEventRecord;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-// Handler value: example.HandleKinesis
-public class HandlerKinesis implements RequestHandler{
- private static final Logger logger = LoggerFactory.getLogger(HandlerKinesis.class);
- Gson gson = new GsonBuilder().setPrettyPrinting().create();
- @Override
- public String handleRequest(KinesisEvent event, Context context)
- {
- String response = new String("200 OK");
- for(KinesisEventRecord record : event.getRecords()) {
- logger.info(gson.toJson(record.getKinesis().getData()));
- }
- // log execution details
- Util.logEnvironment(event, context, gson);
- return response;
- }
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/main/java/example/Util.java b/sample-apps/java-events-v1sdk/src/main/java/example/Util.java
deleted file mode 100644
index feb7475b..00000000
--- a/sample-apps/java-events-v1sdk/src/main/java/example/Util.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package example;
-
-import com.amazonaws.services.lambda.runtime.Context;
-
-import com.google.gson.Gson;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Util {
- private static final Logger logger = LoggerFactory.getLogger(Util.class);
-
- public static void logEnvironment(Object event, Context context, Gson gson)
- {
- // log execution details
- logger.info("ENVIRONMENT VARIABLES: " + gson.toJson(System.getenv()));
- logger.info("CONTEXT: " + gson.toJson(context));
- // log event details
- logger.info("EVENT: " + gson.toJson(event));
- logger.info("EVENT TYPE: " + event.getClass().toString());
- }
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/main/resources/log4j2.xml b/sample-apps/java-events-v1sdk/src/main/resources/log4j2.xml
deleted file mode 100644
index 6c830a00..00000000
--- a/sample-apps/java-events-v1sdk/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- %d{yyyy-MM-dd HH:mm:ss} %X{AWSRequestId} %-5p %c{1} - %m%n
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/test/java/example/InvokeTest.java b/sample-apps/java-events-v1sdk/src/test/java/example/InvokeTest.java
deleted file mode 100644
index 60ed4a8e..00000000
--- a/sample-apps/java-events-v1sdk/src/test/java/example/InvokeTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package example;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.jupiter.api.Test;
-
-import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.events.S3Event;
-import com.amazonaws.services.s3.event.S3EventNotification.S3EventNotificationRecord;
-import com.amazonaws.services.s3.event.S3EventNotification.RequestParametersEntity;
-import com.amazonaws.services.s3.event.S3EventNotification.ResponseElementsEntity;
-import com.amazonaws.services.s3.event.S3EventNotification.S3Entity;
-import com.amazonaws.services.s3.event.S3EventNotification.UserIdentityEntity;
-import com.amazonaws.services.s3.event.S3EventNotification.S3BucketEntity;
-import com.amazonaws.services.s3.event.S3EventNotification.S3ObjectEntity;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.lang.Long;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.io.IOException;
-
-import com.amazonaws.xray.AWSXRay;
-import com.amazonaws.xray.AWSXRayRecorderBuilder;
-import com.amazonaws.xray.strategy.sampling.NoSamplingStrategy;
-
-class InvokeTest {
-
- public InvokeTest() {
- AWSXRayRecorderBuilder builder = AWSXRayRecorderBuilder.standard();
- builder.withSamplingStrategy(new NoSamplingStrategy());
- AWSXRay.setGlobalRecorder(builder.build());
- }
-
- @Test
- void invokeTest() throws IOException {
- AWSXRay.beginSegment("java-s3-test");
- String bucket = new String(Files.readAllLines(Paths.get("bucket-name.txt")).get(0));
- S3EventNotificationRecord record = new S3EventNotificationRecord("us-east-2",
- "ObjectCreated:Put",
- "aws:s3",
- "2020-03-08T00:30:12.456Z",
- "2.1",
- new RequestParametersEntity("174.255.255.156"),
- new ResponseElementsEntity("nBbLJPAHhdvxmplPvtCgTrWCqf/KtonyV93l9rcoMLeIWJxpS9x9P8u01+Tj0OdbAoGs+VGvEvWl/Sg1NW5uEsVO25Laq7L", "AF2D7AB6002E898D"),
- new S3Entity("682bbb7a-xmpl-48ca-94b1-7f77c4d6dbf0",
- new S3BucketEntity(bucket,
- new UserIdentityEntity("A3XMPLFAF2AI3E"),
- "arn:aws:s3:::" + bucket),
- new S3ObjectEntity("inbound/sample-java-s3.png",
- new Long(21476),
- "d132690b6c65b6d1629721dcfb49b883",
- "",
- "005E64A65DF093B26D"),
- "1.0"),
- new UserIdentityEntity("AWS:AIDAINPONIXMPLT3IKHL2"));
- ArrayList records = new ArrayList();
- records.add(record);
- S3Event event = new S3Event(records);
-
- Context context = new TestContext();
- Handler handler = new Handler();
- String result = handler.handleRequest(event, context);
- assertTrue(result.contains("200 OK"));
- AWSXRay.endSegment();
- }
-
-}
diff --git a/sample-apps/java-events-v1sdk/src/test/java/example/TestContext.java b/sample-apps/java-events-v1sdk/src/test/java/example/TestContext.java
deleted file mode 100644
index 69e0af00..00000000
--- a/sample-apps/java-events-v1sdk/src/test/java/example/TestContext.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package example;
-
-import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.CognitoIdentity;
-import com.amazonaws.services.lambda.runtime.ClientContext;
-import com.amazonaws.services.lambda.runtime.LambdaLogger;
-
-public class TestContext implements Context{
-
- public TestContext() {}
- public String getAwsRequestId(){
- return new String("495b12a8-xmpl-4eca-8168-160484189f99");
- }
- public String getLogGroupName(){
- return new String("/aws/lambda/my-function");
- }
- public String getLogStreamName(){
- return new String("2020/02/26/[$LATEST]704f8dxmpla04097b9134246b8438f1a");
- }
- public String getFunctionName(){
- return new String("my-function");
- }
- public String getFunctionVersion(){
- return new String("$LATEST");
- }
- public String getInvokedFunctionArn(){
- return new String("arn:aws:lambda:us-east-2:123456789012:function:my-function");
- }
- public CognitoIdentity getIdentity(){
- return null;
- }
- public ClientContext getClientContext(){
- return null;
- }
- public int getRemainingTimeInMillis(){
- return 300000;
- }
- public int getMemoryLimitInMB(){
- return 512;
- }
- public LambdaLogger getLogger(){
- return new TestLogger();
- }
-
-}
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/src/test/java/example/TestLogger.java b/sample-apps/java-events-v1sdk/src/test/java/example/TestLogger.java
deleted file mode 100644
index 1d3c8efc..00000000
--- a/sample-apps/java-events-v1sdk/src/test/java/example/TestLogger.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package example;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import com.amazonaws.services.lambda.runtime.LambdaLogger;
-
-public class TestLogger implements LambdaLogger {
- private static final Logger logger = LoggerFactory.getLogger(TestLogger.class);
- public void log(String message){
- logger.info(message);
- }
- public void log(byte[] message){
- logger.info(new String(message));
- }
-}
diff --git a/sample-apps/java-events-v1sdk/src/test/resources/log4j2.xml b/sample-apps/java-events-v1sdk/src/test/resources/log4j2.xml
deleted file mode 100644
index 3b69545f..00000000
--- a/sample-apps/java-events-v1sdk/src/test/resources/log4j2.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sample-apps/java-events-v1sdk/template-mvn.yml b/sample-apps/java-events-v1sdk/template-mvn.yml
deleted file mode 100644
index 6cabcd01..00000000
--- a/sample-apps/java-events-v1sdk/template-mvn.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-AWSTemplateFormatVersion: '2010-09-09'
-Transform: 'AWS::Serverless-2016-10-31'
-Description: An AWS Lambda application that calls the Lambda API.
-Resources:
- function:
- Type: AWS::Serverless::Function
- Properties:
- CodeUri: target/java-events-v1sdk-1.0-SNAPSHOT.jar
- Handler: example.Handler
- Runtime: java8
- Description: Java function
- MemorySize: 512
- Timeout: 15
- # Function's execution role
- Policies:
- - AWSLambdaBasicExecutionRole
- - AWSLambda_ReadOnlyAccess
- - AWSXrayWriteOnlyAccess
- - AWSLambdaVPCAccessExecutionRole
- Tracing: Active
diff --git a/sample-apps/java-events-v1sdk/template.yml b/sample-apps/java-events-v1sdk/template.yml
deleted file mode 100644
index b1f59be5..00000000
--- a/sample-apps/java-events-v1sdk/template.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-AWSTemplateFormatVersion: '2010-09-09'
-Transform: 'AWS::Serverless-2016-10-31'
-Description: An AWS Lambda application that calls the Lambda API.
-Resources:
- function:
- Type: AWS::Serverless::Function
- Properties:
- CodeUri: build/distributions/java-events-v1sdk.zip
- Handler: example.Handler
- Runtime: java8
- Description: Java function
- MemorySize: 512
- Timeout: 15
- # Function's execution role
- Policies:
- - AWSLambdaBasicExecutionRole
- - AWSLambda_ReadOnlyAccess
- - AWSXrayWriteOnlyAccess
- - AWSLambdaVPCAccessExecutionRole
- Tracing: Active
- Layers:
- - !Ref libs
- libs:
- Type: AWS::Serverless::LayerVersion
- Properties:
- LayerName: java-events-v1sdk-lib
- Description: Dependencies for the Java S3 sample app.
- ContentUri: build/java-events-v1sdk-lib.zip
- CompatibleRuntimes:
- - java8
diff --git a/sample-apps/java17-examples/1-create-bucket.sh b/sample-apps/java17-examples/1-create-bucket.sh
deleted file mode 100755
index 64a5f749..00000000
--- a/sample-apps/java17-examples/1-create-bucket.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \t\n')
-BUCKET_NAME=lambda-artifacts-$BUCKET_ID
-echo $BUCKET_NAME > bucket-name.txt
-aws s3 mb s3://$BUCKET_NAME
diff --git a/sample-apps/java17-examples/2-deploy.sh b/sample-apps/java17-examples/2-deploy.sh
deleted file mode 100755
index 73723ab9..00000000
--- a/sample-apps/java17-examples/2-deploy.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-ARTIFACT_BUCKET=$(cat bucket-name.txt)
-TEMPLATE=template.yml
-if [ $1 ]
-then
- if [ $1 = mvn ]
- then
- TEMPLATE=template-mvn.yml
- mvn package
- fi
-else
- gradle build -i
-fi
-aws cloudformation package --template-file $TEMPLATE --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
-aws cloudformation deploy --template-file out.yml --stack-name java17-examples --capabilities CAPABILITY_NAMED_IAM
diff --git a/sample-apps/java17-examples/3-invoke.sh b/sample-apps/java17-examples/3-invoke.sh
deleted file mode 100755
index 7ff3bf1b..00000000
--- a/sample-apps/java17-examples/3-invoke.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-FUNCTION=$(aws cloudformation describe-stack-resource --stack-name java17-examples --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text)
-if [ $1 ]
-then
- case $1 in
- string)
- PAYLOAD='"MYSTRING"'
- ;;
-
- int | integer)
- PAYLOAD=12345
- ;;
-
- list)
- PAYLOAD='[24,25,26]'
- ;;
-
- divide)
- PAYLOAD='[235241,17]'
- ;;
-
- *)
- echo -n "Unknown event type"
- ;;
- esac
-fi
-while true; do
- if [ $PAYLOAD ]
- then
- aws lambda invoke --function-name $FUNCTION --payload $PAYLOAD out.json
- else
- aws lambda invoke --function-name $FUNCTION --payload fileb://event.json out.json
- fi
- cat out.json
- echo ""
- sleep 2
-done
diff --git a/sample-apps/java17-examples/4-cleanup.sh b/sample-apps/java17-examples/4-cleanup.sh
deleted file mode 100755
index 45bb0df8..00000000
--- a/sample-apps/java17-examples/4-cleanup.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-set -eo pipefail
-STACK=java17-examples
-if [[ $# -eq 1 ]] ; then
- STACK=$1
- echo "Deleting stack $STACK"
-fi
-FUNCTION=$(aws cloudformation describe-stack-resource --stack-name $STACK --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text)
-aws cloudformation delete-stack --stack-name $STACK
-echo "Deleted $STACK stack."
-
-if [ -f bucket-name.txt ]; then
- ARTIFACT_BUCKET=$(cat bucket-name.txt)
- if [[ ! $ARTIFACT_BUCKET =~ lambda-artifacts-[a-z0-9]{16} ]] ; then
- echo "Bucket was not created by this application. Skipping."
- else
- while true; do
- read -p "Delete deployment artifacts and bucket ($ARTIFACT_BUCKET)? (y/n)" response
- case $response in
- [Yy]* ) aws s3 rb --force s3://$ARTIFACT_BUCKET; rm bucket-name.txt; break;;
- [Nn]* ) break;;
- * ) echo "Response must start with y or n.";;
- esac
- done
- fi
-fi
-
-while true; do
- read -p "Delete function log group (/aws/lambda/$FUNCTION)? (y/n)" response
- case $response in
- [Yy]* ) aws logs delete-log-group --log-group-name /aws/lambda/$FUNCTION; break;;
- [Nn]* ) break;;
- * ) echo "Response must start with y or n.";;
- esac
-done
-
-rm -f out.yml out.json
-rm -rf build .gradle target
diff --git a/sample-apps/java17-examples/README.md b/sample-apps/java17-examples/README.md
deleted file mode 100644
index 9d0ab1ad..00000000
--- a/sample-apps/java17-examples/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# Basic function with minimal dependencies (Java)
-
-
-
-The project source includes function code and supporting resources:
-- `src/main` - A Java function.
-- `src/test` - A unit test and helper classes.
-- `template.yml` - An AWS CloudFormation template that creates an application.
-- `build.gradle` - A Gradle build file.
-- `pom.xml` - A Maven build file.
-- `1-create-bucket.sh`, `2-deploy.sh`, etc. - Shell scripts that use the AWS CLI to deploy and manage the application.
-
-Use the following instructions to deploy the sample application.
-
-# Requirements
-- [Java 17 runtime environment (SE JRE)](https://www.oracle.com/java/technologies/javase-downloads.html)
-- [Gradle 5](https://gradle.org/releases/) or [Maven 3](https://maven.apache.org/docs/history.html)
-- The Bash shell. For Linux and macOS, this is included by default. In Windows 10, you can install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to get a Windows-integrated version of Ubuntu and Bash.
-- [The AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) v1.17 or newer.
-
-# Setup
-Download or clone this repository.
-
- $ git clone https://github.com/awsdocs/aws-lambda-developer-guide.git
- $ cd aws-lambda-developer-guide/sample-apps/java17-examples
-
-To create a new bucket for deployment artifacts, run `1-create-bucket.sh`.
-
- java17-examples$ ./1-create-bucket.sh
- make_bucket: lambda-artifacts-a5e4xmplb5b22e0d
-
-# Deploy
-To deploy the application, run `2-deploy.sh`.
-
- java17-examples$ ./2-deploy.sh
- BUILD SUCCESSFUL in 1s
- Successfully packaged artifacts and wrote output template to file out.yml.
- Waiting for changeset to be created..
- Successfully created/updated stack - java17-examples
-
-This script uses AWS CloudFormation to deploy the Lambda functions and an IAM role. If the AWS CloudFormation stack that contains the resources already exists, the script updates it with any changes to the template or function code.
-
-You can also build the application with Maven. To use maven, add `mvn` to the command.
-
- java17-examples$ ./2-deploy.sh mvn
- [INFO] Scanning for projects...
- [INFO] -----------------------< com.example:java17-examples >-----------------------
- [INFO] Building java17-examples-function 1.0-SNAPSHOT
- [INFO] --------------------------------[ jar ]---------------------------------
- ...
-
-# Test
-To invoke the function, run `3-invoke.sh`.
-
- java17-examples$ ./3-invoke.sh
- {
- "StatusCode": 200,
- "ExecutedVersion": "$LATEST"
- }
- 21
-
-Let the script invoke the function a few times and then press `CRTL+C` to exit.
-
-# Cleanup
-To delete the application, run `4-cleanup.sh`.
-
- java17-examples$ ./4-cleanup.sh
diff --git a/sample-apps/java17-examples/build.gradle b/sample-apps/java17-examples/build.gradle
deleted file mode 100644
index 6f4b7f25..00000000
--- a/sample-apps/java17-examples/build.gradle
+++ /dev/null
@@ -1,33 +0,0 @@
-plugins {
- id 'java'
-}
-
-repositories {
- mavenCentral()
-}
-
-dependencies {
- implementation 'com.amazonaws:aws-lambda-java-core:1.2.1'
- implementation 'org.slf4j:slf4j-nop:2.0.6'
- testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
- testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
-}
-
-test {
- useJUnitPlatform()
-}
-
-task buildZip(type: Zip) {
- from compileJava
- from processResources
- into('lib') {
- from configurations.runtimeClasspath
- }
-}
-
-java {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
-}
-
-build.dependsOn buildZip
diff --git a/sample-apps/java17-examples/event.json b/sample-apps/java17-examples/event.json
deleted file mode 100644
index 8d9c02d0..00000000
--- a/sample-apps/java17-examples/event.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "x": 1,
- "y": 20,
- "message": "Hello World!"
-}
diff --git a/sample-apps/java17-examples/pom.xml b/sample-apps/java17-examples/pom.xml
deleted file mode 100644
index 73a9fcf7..00000000
--- a/sample-apps/java17-examples/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
- 4.0.0
- com.example
- java17-examples
- jar
- 1.0-SNAPSHOT
- java17-examples-function
-
- UTF-8
- 17
- 17
-
-
-
- com.amazonaws
- aws-lambda-java-core
- 1.2.1
-
-
- org.slf4j
- slf4j-nop
- 2.0.6
-
-
- org.junit.jupiter
- junit-jupiter-api
- 5.8.2
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- 5.8.2
- test
-
-
-
-
-
-
- maven-surefire-plugin
- 2.22.2
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 3.2.2
-
- false
-
-
- *:*
-
- module-info.class
- META-INF/*
- META-INF/versions/**
- META-INF/services/**
-
-
-
-
-
-
- package
-
- shade
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.8.1
-
- 17
- 17
-
-
-
-
-
\ No newline at end of file
diff --git a/sample-apps/java17-examples/src/main/java/example/HandlerIntegerJava17.java b/sample-apps/java17-examples/src/main/java/example/HandlerIntegerJava17.java
deleted file mode 100644
index c64d4097..00000000
--- a/sample-apps/java17-examples/src/main/java/example/HandlerIntegerJava17.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package example;
-
-import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.LambdaLogger;
-import com.amazonaws.services.lambda.runtime.RequestHandler;
-
-// Handler value: example.HandlerInteger
-public class HandlerIntegerJava17 implements RequestHandler{
-
- @Override
- /*
- * Takes in an InputRecord, which contains two integers and a String.
- * Logs the String, then returns the sum of the two Integers.
- */
- public Integer handleRequest(IntegerRecord event, Context context)
- {
- LambdaLogger logger = context.getLogger();
- logger.log("String found: " + event.message());
- return event.x() + event.y();
- }
-}
-
-record IntegerRecord(int x, int y, String message) {
-}
diff --git a/sample-apps/java17-examples/template-mvn.yml b/sample-apps/java17-examples/template-mvn.yml
deleted file mode 100644
index 392f1031..00000000
--- a/sample-apps/java17-examples/template-mvn.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-AWSTemplateFormatVersion: '2010-09-09'
-Transform: 'AWS::Serverless-2016-10-31'
-Description: An AWS Lambda application that calls the Lambda API.
-Resources:
- function:
- Type: AWS::Serverless::Function
- Properties:
- CodeUri: target/java17-examples-1.0-SNAPSHOT.jar
- Handler: example.HandlerIntegerJava17
- Runtime: java17
- Description: Java function
- MemorySize: 2048
- Timeout: 10
- # Function's execution role
- Policies:
- - AWSLambdaBasicExecutionRole
- - AWSLambda_ReadOnlyAccess
- - AWSXrayWriteOnlyAccess
- - AWSLambdaVPCAccessExecutionRole
- Tracing: Active
diff --git a/sample-apps/java17-examples/template.yml b/sample-apps/java17-examples/template.yml
deleted file mode 100644
index 42fc6085..00000000
--- a/sample-apps/java17-examples/template.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-AWSTemplateFormatVersion: '2010-09-09'
-Transform: 'AWS::Serverless-2016-10-31'
-Description: An AWS Lambda application that calls the Lambda API.
-Resources:
- function:
- Type: AWS::Serverless::Function
- Properties:
- CodeUri: build/distributions/java17-examples.zip
- Handler: example.HandlerIntegerJava17
- Runtime: java17
- Description: Java function
- MemorySize: 2048
- Timeout: 10
- # Function's execution role
- Policies:
- - AWSLambdaBasicExecutionRole
- - AWSLambda_ReadOnlyAccess
- - AWSXrayWriteOnlyAccess
- - AWSLambdaVPCAccessExecutionRole
- Tracing: Active
diff --git a/sample-apps/layer-python/layer/1-install.sh b/sample-apps/layer-python/layer/1-install.sh
index 97f79f97..c9d93b81 100755
--- a/sample-apps/layer-python/layer/1-install.sh
+++ b/sample-apps/layer-python/layer/1-install.sh
@@ -1,3 +1,3 @@
-python3.11 -m venv create_layer
+python3.13 -m venv create_layer
source create_layer/bin/activate
pip install -r requirements.txt