Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

feat: add server functions and cdn to SsrSite transform #55

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/platform/src/components/aws/ssr-site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export interface SsrSiteArgs extends BaseSsrSiteArgs {
* resources.
*/
transform?: {
/**
* Transform the function used for optimizing images.
*/
imageOptimization?: Transform<FunctionArgs>;
/**
* Transform the Bucket resource used for uploading the assets.
*/
Expand Down Expand Up @@ -569,7 +573,7 @@ function handler(event) {
) {
const fn = new Function(
`${name}${sanitizeToPascalCase(fnName)}`,
{
transform(args.transform?.imageOptimization, {
timeout: "25 seconds",
logging: {
retention: "3 days",
Expand All @@ -585,7 +589,7 @@ function handler(event) {
live: false,
_ignoreCodeChanges: $dev,
_skipMetadata: true,
},
}),
{ parent },
);

Expand Down