Skip to content

Commit

Permalink
update custom function on optional property
Browse files Browse the repository at this point in the history
  • Loading branch information
ykethan committed Jan 23, 2025
1 parent bd81c5c commit d808459
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ AWS Amplify Gen 2 functions are AWS Lambda functions that can be used to perform

<Callout info>

**Note:** [Environment variables and secrets](/[platform]/build-a-backend/functions/environment-variables-and-secrets/), [scheduling configuration](/[platform]/build-a-backend/functions/scheduling-functions/), [lambda layers](/[platform]/build-a-backend/functions/add-lambda-layers/) and [functions-options](/[platform]/build-a-backend/functions/configure-functions/) in `defineFunction` are not supported for Custom Functions. You can specify these configurations directly in your CDK Function definition.
**Note:** The following options in `defineFunction` are not supported for Custom Functions:
- [Environment variables and secrets](/[platform]/build-a-backend/functions/environment-variables-and-secrets/)
- [Scheduling configuration](/[platform]/build-a-backend/functions/scheduling-functions/)
- [Lambda layers](/[platform]/build-a-backend/functions/add-lambda-layers/)
- [Function options](/[platform]/build-a-backend/functions/configure-functions/)

You'll need to configure these options directly in your CDK Function definition instead. However, `resourceGroupName` property is supported and can be used to group related resources together in your `defineFunction` definition.

</Callout>

Expand Down Expand Up @@ -79,7 +85,10 @@ export const sayHelloFunctionHandler = defineFunction(
},
},
}),
})
}),
{
resourceGroupName: "auth" // Optional: Groups this function with auth resource
}
);
```

Expand Down Expand Up @@ -143,6 +152,9 @@ export const sayHelloFunctionHandler = defineFunction(
},
}),
}),
{
resourceGroupName: "auth" // Optional: Groups this function with auth resource
}
);
```

Expand Down

0 comments on commit d808459

Please sign in to comment.