Skip to content

Commit

Permalink
set runtime and architecture for CORS lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
salax committed Mar 29, 2023
1 parent 66e7d33 commit e2715ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion apigateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,16 @@ function corsRoute({ path, cors }: ApiRoute): awsx.apigateway.Route {
return {
path,
method: "OPTIONS",
eventHandler: createCorsHandler(cors)
eventHandler: new aws.lambda.CallbackFunction(
`${path.replace(/\//g, "")}-options`,
{
memorySize: 128,
timeout: 15,
runtime: "nodejs18.x",
architectures: ["arm64"],
callback: createCorsHandler(cors)
}
)
};
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@topmonks/pulumi-aws",
"version": "2.3.0",
"version": "3.0.0",
"description": "Custom AWS Resources for Pulumi",
"keywords": [
"pulumi",
Expand Down

0 comments on commit e2715ac

Please sign in to comment.