-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Describe the bug
In my cloudformation json template I have the following parameter in my parameter list:
"LambdaArchitecture": {
"Type": "String",
"Default": "arm64",
"AllowedValues": ["x86_64", "arm64"],
"Description": "Architecture for lambda functions."
}
And in my AWS::Serverless::Function definitions I set the architecture by referencing this parameter:
"Architectures": [
{
"Ref": "LambdaArchitecture"
}
]
While trying to deploy on my Macbook using dotnet lambda deploy-serverless I get the following error:
"Host machine architecture (Arm64) differs from Lambda architecture (X64). Building Native AOT Lambda functions require the host and lambda architectures to match."
If I hard code the architecture to arm64 I don't get this error.
"Architectures": ["arm64"]
Expected Behavior
The architecture should be set based on the LambdaArchitecture parameter.
Current Behavior
I get an error telling me that the target architecture is set to x86_64 even though I am setting it to arm64 via a cloud formation parameter.
Reproduction Steps
See description
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Amazon Lambda Tools for .NET Core applications (5.10.1)
Targeted .NET Platform
.NET 8
Operating System and version
MacOS Monterey