Skip to content

Commit

Permalink
ssr-site: setting server layers
Browse files Browse the repository at this point in the history
  • Loading branch information
fwang committed Aug 21, 2024
1 parent 4d71cf1 commit c453377
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions platform/src/components/aws/ssr-site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ export interface SsrSiteArgs extends BaseSsrSiteArgs {
* ```
*/
install?: Input<string[]>;
/**
* A list of Lambda layer ARNs to add to the server function.
*
* @example
* ```js
* {
* server: {
* layers: ["arn:aws:lambda:us-east-1:123456789012:layer:my-layer:1"]
* }
* }
* ```
*/
layers?: Input<Input<string>[]>;
};
vpc?: FunctionArgs["vpc"];
/**
Expand Down Expand Up @@ -666,6 +679,10 @@ function handler(event) {
...(props.function.link ?? []),
...(link ?? []),
]),
layers: output(args.server?.layers).apply((layers) => [
...(props.function.layers ?? []),
...(layers ?? []),
]),
url: true,
live: false,
},
Expand Down

0 comments on commit c453377

Please sign in to comment.