Skip to content

Conversation

@mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Dec 10, 2025

Issue # (if applicable)

Closes #36341.

Reason for this change

Improve AWS Bedrock AgentCore constructs by making physical name properties optional, following CDK best practices where names are auto-generated when not specified for better usability and to avoid naming conflicts.

Description of changes

Made physical name properties optional for all AWS Bedrock AgentCore constructs:

  • Implemented auto-generation using Names.uniqueResourceName() when names are omitted
  • Applied to: Gateway, Runtime, RuntimeEndpoint, Memory, BrowserCustom, CodeInterpreterCustom, and all GatewayTarget types

Describe any new or updated permissions being added

None.

Description of how you validated changes

Added unit tests for auto-generation functionality for all constructs

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team December 10, 2025 15:15
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Dec 10, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter fails with the following errors:

❌ Features must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

TestsPassed ❌️SkippedFailed
Security Guardian Results
TestResult
No test annotations available

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

TestsPassed ❌️SkippedFailed
Security Guardian Results with resolved templates
TestResult
No test annotations available

@github-actions github-actions bot added the effort/medium Medium work item – several days of effort label Dec 11, 2025
@mazyu36
Copy link
Contributor Author

mazyu36 commented Dec 11, 2025

Exemption Request: This change only makes physical name properties optional with auto-generation fallback - no new functionality or CloudFormation template changes that would require integration test snapshots.

@mazyu36 mazyu36 marked this pull request as ready for review December 11, 2025 06:40
@aws-cdk-automation aws-cdk-automation added pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Dec 11, 2025
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've added a minor comment.

expect(memory.kmsKey?.keyArn).toBeDefined();
});
});
// Tests for optional physical names (issue #36341)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this comment is not essential.

Suggested change
// Tests for optional physical names (issue #36341)

Could you please remove this line from gateway/runtime/browser.test.ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment was included in all AgentCore resource tests...🤦
Thank you. I've deleted it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've not realized that.. Sorry if you're asked by the maintainer to restore the comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your point is correct :)
These are all unnecessary comments that I added in this PR, so I should have deleted them.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Dec 11, 2025
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

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

Thanks!

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-bedrock-agentcore-alpha): Make physical name properties optional for all resources

3 participants