Matt Bulwan
11/05/2021, 5:18 AMimport { Architecture } from "@aws-cdk/aws-lambda";
...
app.setDefaultFunctionProps({
timeout: 120,
memorySize: 256,
architecture: Architecture.arm64,
....
Ross Coundon
11/05/2021, 7:14 AMimport { Architecture } from '@aws-cdk/aws-lambda';
// default to ARM architecture but allow override if we're in a region that doesn't support it
const architecture = process.env.LAMBDA_ARCHITECTURE === 'ARM_64' ? Architecture.ARM_64 : Architecture.X86_64;
export default function main(app: <http://sst.App|sst.App>): void {
app.setDefaultFunctionProps({
runtime: 'nodejs14.x',
architectures: [architecture],
})
...
}
Matt Bulwan
11/05/2021, 8:16 PMRoss Coundon
11/05/2021, 8:23 PMRoss Coundon
11/05/2021, 8:23 PMClayton
11/15/2021, 3:07 PMRoss Coundon
11/15/2021, 3:35 PMClayton
11/15/2021, 3:52 PMRoss Coundon
11/15/2021, 4:25 PMClayton
11/15/2021, 8:16 PMprocess.env.LAMBDA_ARCHITECTURE
was something that the region set/dictated. Is this something you are setting manually within the account in addition to updating the stack index with that code?Ross Coundon
11/15/2021, 8:51 PMconst architecture = process.env.LAMBDA_ARCHITECTURE === 'ARM_64' ? Architecture.ARM_64 : Architecture.X86_64;
Clayton
11/15/2021, 9:03 PMSam Hulick
11/19/2021, 2:02 AM