Skip to content

chore(network-connector): switch OperatorRole to managed policy and fill sam-docs descriptions#3954

Merged
licjun merged 1 commit into
developfrom
microvm-patch
Jul 7, 2026
Merged

chore(network-connector): switch OperatorRole to managed policy and fill sam-docs descriptions#3954
licjun merged 1 commit into
developfrom
microvm-patch

Conversation

@licjun

@licjun licjun commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available

N/A

Description of changes

  1. NetworkConnector OperatorRole: Replace the inline policy with AWSLambdaNetworkConnectorOperatorPolicy AWS managed policy for the auto-generated OperatorRole, aligning with how CapacityProvider handles its operator role.

  2. sam-docs.json: Fill in property descriptions for MicrovmImage, NetworkConnector, and WebSocketApi resources (previously TODO).

Description of how you validated changes

  • Unit tests: make pr passed (4617 tests, 95.63% coverage)
  • Integration tests: test_basic_network_connector passed against us-east-2

Checklist

Examples?

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@licjun licjun requested a review from a team as a code owner July 7, 2026 16:38
@licjun licjun changed the title feat(network-connector): switch OperatorRole from inline policy to ma… chore(network-connector): switch OperatorRole to managed policy and fill sam-docs descriptions Jul 7, 2026

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: da148ea..289f9ea
Files: 15
Comments: 2

Comment thread samtranslator/internal/schema_source/sam-docs.json Outdated
Comment thread samtranslator/internal/schema_source/sam-docs.json Outdated

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: da148ea..d6b8532
Files: 15
Comments: 1

Comment thread samtranslator/internal/schema_source/sam-docs.json Outdated

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@licjun licjun merged commit ed441b4 into develop Jul 7, 2026
9 checks passed
@licjun licjun deleted the microvm-patch branch July 7, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants