Skip to content

Commit 7c62d68

Browse files
authored
docs(lambda): clarify FunctionOptions.allowAllOutbound property (#28367)
The following PR adds validation for the case when `allowAllOutbound` and `securityGroups` are specified at the same time in `FunctionOptions`. #26528 (#27157) According to related issues and discussions, this PR causes existing Lambda deployments to fail. However, since this change has already been merged and I think it is the correct change, I did not fix the validation process but added documentation to clarify the behavior. Relates to #28170, #27669 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 37be7b9 commit 7c62d68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/aws-cdk-lib/aws-lambda/lib/function.ts

+3
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ export interface FunctionOptions extends EventInvokeConfigOptions {
260260
* If set to false, you must individually add traffic rules to allow the
261261
* Lambda to connect to network targets.
262262
*
263+
* Do not specify this property if the `securityGroups` or `securityGroup` property is set.
264+
* Instead, configure `allowAllOutbound` directly on the security group.
265+
*
263266
* @default true
264267
*/
265268
readonly allowAllOutbound?: boolean;

0 commit comments

Comments
 (0)