Skip to content

Commit d808459

Browse files
committed
update custom function on optional property
1 parent bd81c5c commit d808459

File tree

1 file changed

+14
-2
lines changed
  • src/pages/[platform]/build-a-backend/functions/custom-functions

1 file changed

+14
-2
lines changed

src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx

+14-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ AWS Amplify Gen 2 functions are AWS Lambda functions that can be used to perform
4040

4141
<Callout info>
4242

43-
**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.
43+
**Note:** The following options in `defineFunction` are not supported for Custom Functions:
44+
- [Environment variables and secrets](/[platform]/build-a-backend/functions/environment-variables-and-secrets/)
45+
- [Scheduling configuration](/[platform]/build-a-backend/functions/scheduling-functions/)
46+
- [Lambda layers](/[platform]/build-a-backend/functions/add-lambda-layers/)
47+
- [Function options](/[platform]/build-a-backend/functions/configure-functions/)
48+
49+
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.
4450

4551
</Callout>
4652

@@ -79,7 +85,10 @@ export const sayHelloFunctionHandler = defineFunction(
7985
},
8086
},
8187
}),
82-
})
88+
}),
89+
{
90+
resourceGroupName: "auth" // Optional: Groups this function with auth resource
91+
}
8392
);
8493
```
8594

@@ -143,6 +152,9 @@ export const sayHelloFunctionHandler = defineFunction(
143152
},
144153
}),
145154
}),
155+
{
156+
resourceGroupName: "auth" // Optional: Groups this function with auth resource
157+
}
146158
);
147159
```
148160

0 commit comments

Comments
 (0)