feat(lambda): add NetworkConnector L2 construct#38266
Open
licjun wants to merge 1 commit into
Open
Conversation
Contributor
|
👋 It looks like your PR description follows the template but is missing a valid issue number in the first section. PRs without a linked issue will receive lower priority for review and merging. Please update the description to include a reference like |
aws-cdk-automation
previously requested changes
Jul 7, 2026
8a05a63 to
7ed87a8
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
7ed87a8 to
49b9b4c
Compare
Implement L2 construct for AWS::Lambda::NetworkConnector with: - Static factory pattern for configuration (NetworkConnectorConfig.vpcEgress) - Auto-generated OperatorRole with AWSLambdaNetworkConnectorOperatorPolicy - Type-safe enums for NetworkProtocol and ComputeType - Import methods (fromNetworkConnectorArn, fromNetworkConnectorAttributes) - Construct-time validation (subnets, security groups, name) - Token-safety for unresolved values - Unit tests (20 passing) - Integration tests (2, both deployed successfully) - README documentation sim: https://t.corp.amazon.com/P459402297
49b9b4c to
2e447bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue # (if applicable)
N/A — new resource, tracked internally via P459402297
Reason for this change
AWS::Lambda::NetworkConnectoris a new CloudFormation resource that enables Lambda compute resources (MicroVMs) to access customer VPCs. This PR adds an L2 construct to provide a developer-friendly interface with sensible defaults.Description of changes
Implements
NetworkConnectorL2 construct inaws-cdk-lib/aws-lambda:NetworkConnectorConfig.vpcEgress(...)) — enforces mutual exclusivity by types, extensible for future connector typesAWSLambdaNetworkConnectorOperatorPolicymanaged policy when not provided (follows CapacityProvider/Function pattern)NetworkProtocol(IPv4, DualStack) andComputeType(MicroVMs)fromNetworkConnectorArn,fromNetworkConnectorAttributesDescribe any new or updated permissions being added
The auto-generated OperatorRole uses the AWS managed policy
AWSLambdaNetworkConnectorOperatorPolicywhich grants:ec2:CreateNetworkInterface(subnet, security-group, network-interface resources)ec2:CreateTags(network-interface, with condition onec2:CreateActionandec2:ManagedResourceOperator)Description of how you validated changes
integ.network-connector-defaults.ts,integ.network-connector-all-fields.ts) — both deployed successfully to AWSChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license