diff --git a/.github/scripts/publish_e2e_test_summary.py b/.github/scripts/publish_e2e_test_summary.py new file mode 100644 index 000000000..200605a9b --- /dev/null +++ b/.github/scripts/publish_e2e_test_summary.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 + +import os +import xml.etree.ElementTree as ET +from pathlib import Path + + +def markdown(value): + return str(value).replace("|", "\\|").replace("\n", " ") + + +def main(): + reports = sorted(Path("target/surefire-reports").glob("TEST-*.xml")) + summary_path = Path(os.environ["GITHUB_STEP_SUMMARY"]) + + with summary_path.open("a", encoding="utf-8") as summary: + summary.write(f"### Java {os.environ['JAVA_VERSION']} E2E Test Cases\n\n") + + if not reports: + summary.write("No Surefire XML test reports were found.\n\n") + return + + total_tests = 0 + total_failures = 0 + total_errors = 0 + total_skipped = 0 + total_time = 0.0 + cases = [] + + for report in reports: + suite = ET.parse(report).getroot() + total_tests += int(suite.attrib.get("tests", 0)) + total_failures += int(suite.attrib.get("failures", 0)) + total_errors += int(suite.attrib.get("errors", 0)) + total_skipped += int(suite.attrib.get("skipped", 0)) + total_time += float(suite.attrib.get("time", 0)) + + for case in suite.findall("testcase"): + status = "Passed" + if case.find("failure") is not None: + status = "Failed" + elif case.find("error") is not None: + status = "Errored" + elif case.find("skipped") is not None: + status = "Skipped" + + cases.append( + ( + status, + case.attrib.get("classname", suite.attrib.get("name", "")), + case.attrib.get("name", ""), + float(case.attrib.get("time", 0)), + ) + ) + + passed = total_tests - total_failures - total_errors - total_skipped + summary.write( + f"**Totals:** {total_tests} tests, {passed} passed, {total_failures} failed, " + f"{total_errors} errored, {total_skipped} skipped, {total_time:.2f}s\n\n" + ) + summary.write("| Status | Class | Test case | Time |\n") + summary.write("| --- | --- | --- | ---: |\n") + + for status, class_name, test_name, case_time in sorted(cases): + summary.write(f"| {status} | `{markdown(class_name)}` | `{markdown(test_name)}` | {case_time:.2f}s |\n") + + summary.write("\n") + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 1891cfa3d..89a2a89a3 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -36,6 +36,7 @@ jobs: e2e-tests: env: AWS_REGION: us-west-2 + E2E_TEST_PARALLELISM: 4 runs-on: ubuntu-latest strategy: fail-fast: false @@ -55,9 +56,10 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1 with: - role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}" + role-to-assume: "${{ secrets.TEST_ROLE_ARN }}" role-session-name: java-language-sdk-test aws-region: ${{ env.AWS_REGION }} + allowed-account-ids: ${{ secrets.TEST_ACCOUNT_ID }} - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v5 with: @@ -67,16 +69,34 @@ jobs: - name: Build locally run: mvn -B -q -Dmaven.test.skip=true install --file pom.xml - name: sam build + env: + MAVEN_OPTS: -DskipTests=true -Dmaven.test.skip=true run: | # add --no-cached if debugging sam build sam build --debug --parameter-overrides \ - 'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=RoleArn,ParameterValue=${{ secrets.DURABLE_INTEGRATION_TEST_ROLE_ARN }}' + 'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=FunctionNamePrefix,ParameterValue=Java${{ matrix.java }}- ParameterKey=RoleArn,ParameterValue=${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}' working-directory: ./examples - name: sam deploy run: | - sam deploy --stack-name JavaSDKCloudBasedIntegrationTestStack-Java${{ matrix.java }}Runtime \ + sam deploy --stack-name Java${{ matrix.java }}-JavaSDKCloudBasedIntegrationTestStack \ --resolve-image-repos --resolve-s3 --parameter-overrides \ - 'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=RoleArn,ParameterValue=${{ secrets.DURABLE_INTEGRATION_TEST_ROLE_ARN }}' + 'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=FunctionNamePrefix,ParameterValue=Java${{ matrix.java }}- ParameterKey=RoleArn,ParameterValue=${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}' working-directory: ./examples - name: Cloud Based Integration Tests - run: mvn clean test -B -Dtest.cloud.enabled=true -Dtest="CloudBasedIntegrationTest,OtelXRayIntegrationTest" -Dtest.function.name.suffix='-java${{ matrix.java }}-runtime' + run: | + mvn clean test -B \ + -Dtest.cloud.enabled=true \ + -Dtest.aws.account='${{ secrets.TEST_ACCOUNT_ID }}' \ + -Dtest="CloudBasedIntegrationTest,OtelXRayIntegrationTest" \ + -Dtest.function.name.prefix='Java${{ matrix.java }}-' \ + -Djunit.jupiter.execution.parallel.enabled=true \ + -Djunit.jupiter.execution.parallel.mode.default=concurrent \ + -Djunit.jupiter.execution.parallel.mode.classes.default=concurrent \ + -Djunit.jupiter.execution.parallel.config.strategy=fixed \ + -Djunit.jupiter.execution.parallel.config.fixed.parallelism=${{ env.E2E_TEST_PARALLELISM }} + working-directory: ./examples + - name: Publish test case summary + if: always() + env: + JAVA_VERSION: ${{ matrix.java }} + run: python3 ../.github/scripts/publish_e2e_test_summary.py working-directory: ./examples diff --git a/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/RetryInvokeExample.java b/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/RetryInvokeExample.java index 28cec8dc0..ff61bf8aa 100644 --- a/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/RetryInvokeExample.java +++ b/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/RetryInvokeExample.java @@ -24,13 +24,12 @@ public class RetryInvokeExample extends DurableHandler @Override public String handleRequest(GreetingRequest input, DurableContext context) { + var targetFunctionName = + System.getenv().getOrDefault("FUNCTION_NAME_PREFIX", "") + "simple-step-example:$LATEST"; + return context.withRetry( null, - (attempt, ctx) -> ctx.invoke( - "call-greeting-" + attempt, - "simple-step-example" + input.getName() + ":$LATEST", - input, - String.class), + (attempt, ctx) -> ctx.invoke("call-greeting-" + attempt, targetFunctionName, input, String.class), WithRetryConfig.builder() .retryStrategy((error, attempt) -> attempt < MAX_ATTEMPTS ? RetryDecision.retry(Duration.ofSeconds(2)) diff --git a/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/SimpleInvokeExample.java b/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/SimpleInvokeExample.java index b675c7966..ab9001ab5 100644 --- a/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/SimpleInvokeExample.java +++ b/examples/src/main/java/software/amazon/lambda/durable/examples/invoke/SimpleInvokeExample.java @@ -16,16 +16,19 @@ public class SimpleInvokeExample extends DurableHandler @Override public String handleRequest(GreetingRequest input, DurableContext context) { + var targetFunctionName = + System.getenv().getOrDefault("FUNCTION_NAME_PREFIX", "") + "simple-step-example:$LATEST"; + // Invoke the `simple-step-example` function. var future = context.invokeAsync( "call-greeting1", - "simple-step-example" + input.getName() + ":$LATEST", + targetFunctionName, input, String.class, InvokeConfig.builder().build()); var result2 = context.invoke( "call-greeting2", - "simple-step-example" + input.getName() + ":$LATEST", + targetFunctionName, input, String.class, InvokeConfig.builder().build()); diff --git a/examples/src/test/java/software/amazon/lambda/durable/examples/CloudBasedIntegrationTest.java b/examples/src/test/java/software/amazon/lambda/durable/examples/CloudBasedIntegrationTest.java index 22346df0e..0f55923ea 100644 --- a/examples/src/test/java/software/amazon/lambda/durable/examples/CloudBasedIntegrationTest.java +++ b/examples/src/test/java/software/amazon/lambda/durable/examples/CloudBasedIntegrationTest.java @@ -41,7 +41,7 @@ class CloudBasedIntegrationTest { private static String account; private static String region; - private static String functionNameSuffix; + private static String functionNamePrefix; private static LambdaClient lambdaClient; static boolean isEnabled() { @@ -62,7 +62,7 @@ static void setup() { account = System.getProperty("test.aws.account"); region = System.getProperty("test.aws.region"); - functionNameSuffix = System.getProperty("test.function.name.suffix", "-java17-runtime"); + functionNamePrefix = System.getProperty("test.function.name.prefix", ""); if (account == null || region == null) { try (var sts = StsClient.create()) { @@ -81,7 +81,7 @@ static void setup() { } private static String arn(String functionName) { - return "arn:aws:lambda:" + region + ":" + account + ":function:" + functionName + functionNameSuffix + return "arn:aws:lambda:" + region + ":" + account + ":function:" + functionNamePrefix + functionName + ":$LATEST"; } @@ -142,7 +142,7 @@ void testNoopExampleWithLargeInput() { void testSimpleInvokeExample() { var runner = CloudDurableTestRunner.create( arn("simple-invoke-example"), new TypeToken>() {}, get(String.class), lambdaClient); - var result = runner.run(Map.of("name", functionNameSuffix)); + var result = runner.run(Map.of("name", "test")); assertEquals(ExecutionStatus.SUCCEEDED, result.getStatus()); assertNotNull(result.getResult()); @@ -722,9 +722,7 @@ void testComplexFlatMapExample() { void testRetryInvokeExample() { var runner = CloudDurableTestRunner.create( arn("retry-invoke-example"), GreetingRequest.class, String.class, lambdaClient); - // The handler invokes "simple-step-example" + input.getName() + ":$LATEST", - // so passing the functionNameSuffix as the name targets the deployed simple-step-example function - var result = runner.run(new GreetingRequest(functionNameSuffix)); + var result = runner.run(new GreetingRequest("test")); assertEquals(ExecutionStatus.SUCCEEDED, result.getStatus()); assertNotNull(result.getResult()); diff --git a/examples/src/test/java/software/amazon/lambda/durable/examples/OtelXRayIntegrationTest.java b/examples/src/test/java/software/amazon/lambda/durable/examples/OtelXRayIntegrationTest.java index bee76a806..776a993db 100644 --- a/examples/src/test/java/software/amazon/lambda/durable/examples/OtelXRayIntegrationTest.java +++ b/examples/src/test/java/software/amazon/lambda/durable/examples/OtelXRayIntegrationTest.java @@ -59,7 +59,7 @@ class OtelXRayIntegrationTest { private static String account; private static String region; - private static String functionNameSuffix; + private static String functionNamePrefix; private static LambdaClient lambdaClient; private static XRayClient xrayClient; @@ -81,7 +81,7 @@ static void setup() { account = System.getProperty("test.aws.account"); region = System.getProperty("test.aws.region"); - functionNameSuffix = System.getProperty("test.function.name.suffix", "-java17-runtime"); + functionNamePrefix = System.getProperty("test.function.name.prefix", ""); if (account == null || region == null) { try (var sts = StsClient.create()) { @@ -105,7 +105,7 @@ static void setup() { } private static String arn(String functionName) { - return "arn:aws:lambda:" + region + ":" + account + ":function:" + functionName + functionNameSuffix + return "arn:aws:lambda:" + region + ":" + account + ":function:" + functionNamePrefix + functionName + ":$LATEST"; } @@ -260,7 +260,7 @@ private List queryTracesWithRetry(Instant startTime, Instant endTi // built-in X-Ray segment (durable backend propagates its own trace root) // Filter by the Lambda function's service name — each function has a unique one. // This avoids picking up traces from other durable functions that share service.name="invocation". - var filterExpression = "service(\"" + functionName + functionNameSuffix + "\")"; + var filterExpression = "service(\"" + functionNamePrefix + functionName + "\")"; for (int attempt = 0; attempt < XRAY_QUERY_RETRIES; attempt++) { var response = xrayClient.getTraceSummaries(GetTraceSummariesRequest.builder() .startTime(startTime) diff --git a/examples/template.yaml b/examples/template.yaml index d528b8b42..c2fe5800f 100644 --- a/examples/template.yaml +++ b/examples/template.yaml @@ -14,6 +14,10 @@ Parameters: Type: String Default: 'java17' Description: Java runtime version + FunctionNamePrefix: + Type: String + Default: '' + Description: Optional prefix for Lambda function names RoleArn: Type: String Description: IAM Role ARN for Lambda function execution @@ -34,16 +38,18 @@ Globals: ExecutionTimeout: 300 RetentionPeriodInDays: 7 Runtime: !Ref JavaVersion + Environment: + Variables: + FUNCTION_NAME_PREFIX: !Ref FunctionNamePrefix Resources: NoopExampleFunction: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - noop-example - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - noop-example Handler: "software.amazon.lambda.durable.examples.general.NoopExample" Role: !Ref RoleArn @@ -51,10 +57,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - simple-step-example - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - simple-step-example Handler: "software.amazon.lambda.durable.examples.step.SimpleStepExample" Role: !Ref RoleArn @@ -62,10 +67,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'simple-invoke-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - simple-invoke-example Handler: "software.amazon.lambda.durable.examples.invoke.SimpleInvokeExample" Role: !Ref RoleArn @@ -73,10 +77,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'wait-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - wait-example Handler: "software.amazon.lambda.durable.examples.wait.WaitExample" Role: !Ref RoleArn @@ -84,10 +87,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'retry-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - retry-example Handler: "software.amazon.lambda.durable.examples.step.RetryExample" Role: !Ref RoleArn @@ -95,10 +97,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'wait-at-least-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - wait-at-least-example Handler: "software.amazon.lambda.durable.examples.wait.WaitAtLeastExample" Role: !Ref RoleArn @@ -106,10 +107,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'wait-at-least-in-process-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - wait-at-least-in-process-example Handler: "software.amazon.lambda.durable.examples.wait.WaitAtLeastInProcessExample" Role: !Ref RoleArn @@ -117,10 +117,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'retry-in-process-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - retry-in-process-example Handler: "software.amazon.lambda.durable.examples.step.RetryInProcessExample" Role: !Ref RoleArn @@ -128,10 +127,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'generic-types-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - generic-types-example Handler: "software.amazon.lambda.durable.examples.general.GenericTypesExample" Role: !Ref RoleArn @@ -139,10 +137,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'generic-input-output-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - generic-input-output-example Handler: "software.amazon.lambda.durable.examples.general.GenericInputOutputExample" Role: !Ref RoleArn @@ -150,10 +147,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'custom-config-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - custom-config-example Handler: "software.amazon.lambda.durable.examples.general.CustomConfigExample" Role: !Ref RoleArn @@ -161,10 +157,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'logging-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - logging-example Handler: "software.amazon.lambda.durable.examples.general.LoggingExample" Role: !Ref RoleArn @@ -172,10 +167,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'error-handling-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - error-handling-example Handler: "software.amazon.lambda.durable.examples.general.ErrorHandlingExample" Role: !Ref RoleArn @@ -183,10 +177,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'callback-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - callback-example Handler: "software.amazon.lambda.durable.examples.callback.CallbackExample" Role: !Ref RoleArn @@ -194,10 +187,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'many-async-steps-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - many-async-steps-example Handler: "software.amazon.lambda.durable.examples.step.ManyAsyncStepsExample" Role: !Ref RoleArn @@ -205,10 +197,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'child-context-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - child-context-example Handler: "software.amazon.lambda.durable.examples.child.ChildContextExample" Role: !Ref RoleArn @@ -216,10 +207,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'virtual-child-context-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - virtual-child-context-example Handler: "software.amazon.lambda.durable.examples.child.VirtualChildContextExample" Role: !Ref RoleArn @@ -227,10 +217,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'wait-async-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - wait-async-example Handler: "software.amazon.lambda.durable.examples.wait.WaitAsyncExample" Role: !Ref RoleArn @@ -238,10 +227,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'many-async-child-context-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - many-async-child-context-example Handler: "software.amazon.lambda.durable.examples.child.ManyAsyncChildContextExample" Role: !Ref RoleArn @@ -249,10 +237,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'simple-map-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - simple-map-example Handler: "software.amazon.lambda.durable.examples.map.SimpleMapExample" Role: !Ref RoleArn @@ -260,10 +247,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'complex-map-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - complex-map-example Handler: "software.amazon.lambda.durable.examples.map.ComplexMapExample" Role: !Ref RoleArn @@ -271,10 +257,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'complex-flat-map-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - complex-flat-map-example Handler: "software.amazon.lambda.durable.examples.map.ComplexFlatMapExample" Role: !Ref RoleArn @@ -282,10 +267,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'wait-for-condition-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - wait-for-condition-example Handler: "software.amazon.lambda.durable.examples.wait.WaitForConditionExample" Role: !Ref RoleArn @@ -293,10 +277,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'concurrent-wait-for-condition-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - concurrent-wait-for-condition-example Handler: "software.amazon.lambda.durable.examples.wait.ConcurrentWaitForConditionExample" Role: !Ref RoleArn @@ -304,10 +287,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'retry-wait-for-callback-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - retry-wait-for-callback-example Handler: "software.amazon.lambda.durable.examples.callback.RetryWaitForCallbackExample" Role: !Ref RoleArn @@ -315,10 +297,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'wait-for-callback-failed-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - wait-for-callback-failed-example Handler: "software.amazon.lambda.durable.examples.callback.WaitForCallbackFailedExample" Role: !Ref RoleArn @@ -326,10 +307,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'custom-polling-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - custom-polling-example Handler: "software.amazon.lambda.durable.examples.general.CustomPollingExample" Role: !Ref RoleArn @@ -337,10 +317,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'plugin-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - plugin-example Handler: "software.amazon.lambda.durable.examples.general.PluginExample" Role: !Ref RoleArn @@ -348,10 +327,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'otel-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - otel-example Handler: "software.amazon.lambda.durable.examples.general.OtelExample" Role: !Ref RoleArn @@ -359,10 +337,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'otel-xray-step-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - otel-xray-step-example Handler: "software.amazon.lambda.durable.examples.otel.OtelXRayStepExample" Role: !Ref RoleArn Tracing: Active @@ -375,10 +352,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'otel-xray-wait-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - otel-xray-wait-example Handler: "software.amazon.lambda.durable.examples.otel.OtelXRayWaitExample" Role: !Ref RoleArn Tracing: Active @@ -391,10 +367,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'retry-invoke-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - retry-invoke-example Handler: "software.amazon.lambda.durable.examples.invoke.RetryInvokeExample" Role: !Ref RoleArn @@ -402,10 +377,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'deserialization-failed-map-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - deserialization-failed-map-example Handler: "software.amazon.lambda.durable.examples.map.DeserializationFailedMapExample" Role: !Ref RoleArn @@ -413,10 +387,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'parallel-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - parallel-example Handler: "software.amazon.lambda.durable.examples.parallel.ParallelExample" Role: !Ref RoleArn @@ -424,10 +397,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'parallel-failure-tolerance-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - parallel-failure-tolerance-example Handler: "software.amazon.lambda.durable.examples.parallel.ParallelFailureToleranceExample" Role: !Ref RoleArn @@ -435,10 +407,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'parallel-with-wait-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - parallel-with-wait-example Handler: "software.amazon.lambda.durable.examples.parallel.ParallelWithWaitExample" Role: !Ref RoleArn @@ -446,10 +417,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'deserialization-failed-parallel-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - deserialization-failed-parallel-example Handler: "software.amazon.lambda.durable.examples.parallel.DeserializationFailedParallelExample" Role: !Ref RoleArn @@ -457,10 +427,9 @@ Resources: Type: AWS::Serverless::Function Properties: FunctionName: !Join - - '-' - - - 'deserialization-failure-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - deserialization-failure-example Handler: "software.amazon.lambda.durable.examples.step.DeserializationFailureExample" Role: !Ref RoleArn @@ -469,10 +438,9 @@ Resources: Condition: IsJava21OrLater Properties: FunctionName: !Join - - '-' - - - 'many-async-steps-virtual-thread-pool-example' - - !Ref JavaVersion - - runtime + - '' + - - !Ref FunctionNamePrefix + - many-async-steps-virtual-thread-pool-example Handler: "software.amazon.lambda.durable.examples.vt.ManyAsyncStepsVirtualThreadPoolExample" Role: !Ref RoleArn