diff --git a/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/BaseCustomRuntimeTest.cs b/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/BaseCustomRuntimeTest.cs index 148b52649..a7db772aa 100644 --- a/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/BaseCustomRuntimeTest.cs +++ b/Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/BaseCustomRuntimeTest.cs @@ -1,15 +1,16 @@ -using Amazon.IdentityManagement; -using Amazon.IdentityManagement.Model; -using Amazon.Lambda.Model; -using Amazon.S3; -using Amazon.S3.Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; +using Amazon.IdentityManagement; +using Amazon.IdentityManagement.Model; +using Amazon.Lambda.Model; +using Amazon.S3; +using Amazon.S3.Model; namespace Amazon.Lambda.RuntimeSupport.IntegrationTests { @@ -291,7 +292,8 @@ protected async Task CreateFunctionAsync(IAmazonLambda lambdaClient, string buck MemorySize = FUNCTION_MEMORY_MB, Timeout = 30, Runtime = runtime, - Role = ExecutionRoleArn + Role = ExecutionRoleArn, + Architectures = new List { RuntimeInformation.OSArchitecture == System.Runtime.InteropServices.Architecture.Arm64 ? Architecture.Arm64 : Architecture.X86_64 } }; var startTime = DateTime.Now; diff --git a/Libraries/test/TestServerlessApp/serverless.template b/Libraries/test/TestServerlessApp/serverless.template index 65220b6ae..596bdd017 100644 --- a/Libraries/test/TestServerlessApp/serverless.template +++ b/Libraries/test/TestServerlessApp/serverless.template @@ -2,6 +2,30 @@ "AWSTemplateFormatVersion": "2010-09-09", "Transform": "AWS::Serverless-2016-10-31", "Description": "This template is partially managed by Amazon.Lambda.Annotations (v2.0.1.0).", + "Parameters": { + "ArchitectureTypeParameter": { + "Type": "String", + "Default": "x86_64", + "AllowedValues": [ + "x86_64", + "arm64" + ], + "Description": "The architecture of the Lambda function." + } + }, + "Globals": { + "Function": { + "Architectures": [ + { + "Ref": "ArchitectureTypeParameter" + } + ], + "Tags": { + "aws-tests": "TestServerlessApp", + "aws-repo": "aws-lambda-dotnet" + } + } + }, "Resources": { "AnnotationsHttpApi": { "Type": "AWS::Serverless::HttpApi", @@ -1569,4 +1593,4 @@ "Type": "AWS::DynamoDB::Table" } } -} \ No newline at end of file +}