chore(network-connector): switch OperatorRole to managed policy and fill sam-docs descriptions#3954
Conversation
There was a problem hiding this comment.
Code Review Results
Reviewed: da148ea..bd5f6d8
Files: 15
Comments: 1
Comments on lines outside the diff:
[samtranslator/internal/schema_source/sam-docs.json:1006] [BUG] The new VpcConfig description under sam-resource-networkconnector states that AWS SAM injects AssociatedComputeResourceTypes: [MicroVM] automatically, but the actual value injected by samtranslator/model/network_connector/generators.py (and reflected in every tests/translator/output/network_connector.json) is "MicroVm" (lower‑case m), not "MicroVM":
"AssociatedComputeResourceTypes": ["MicroVm"],Update the description to match the value the transform actually emits (e.g. AssociatedComputeResourceTypes: [MicroVm]) so users comparing the docs to generated CFN don't hit a confusing mismatch. The same wording appears in the corresponding markdownDescription in samtranslator/schema/schema.json and schema_source/sam.schema.json and should be updated in all three places.
Note on prior review comments: the three earlier bugs flagged on sam-docs.json (Logging.Disabled type, CpuConfiguration.Architecture valid values, Hooks.Port required) have all been correctly addressed in the current diff. The NetworkConnectorGenerator refactor to use construct_role_for_resource with AWSLambdaNetworkConnectorOperatorPolicy mirrors the CapacityProvider pattern, produces correctly partitioned ARNs (aws, aws-cn, aws-us-gov) in the snapshot outputs, and preserves the passthrough_resource_attributes and SAM tag behavior.
…naged policy Replace the inline policy with AWSLambdaNetworkConnectorOperatorPolicy managed policy for the auto-generated OperatorRole. Also fill in sam-docs.json descriptions for MicrovmImage, NetworkConnector, and WebSocketApi resources.
Issue #, if available
N/A
Description of changes
NetworkConnector OperatorRole: Replace the inline policy with
AWSLambdaNetworkConnectorOperatorPolicyAWS managed policy for the auto-generated OperatorRole, aligning with how CapacityProvider handles its operator role.sam-docs.json: Fill in property descriptions for MicrovmImage, NetworkConnector, and WebSocketApi resources (previously
TODO).Description of how you validated changes
make prpassed (4617 tests, 95.63% coverage)test_basic_network_connectorpassed against us-east-2Checklist
Examples?
N/A
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.