Skip to content

Conversation

@ozelalisen
Copy link
Member

Issue # (if applicable)

Closes #34033.

Reason for this change

The throughput property for GP3 volumes is not supported on EC2 instances and only works with Launch Templates. This causes confusion for users who try to set throughput on EC2 instance block devices, as the property is silently ignored.

Description of changes

Added synthesis-time validation in the instanceBlockDeviceMappings function to detect when throughput is specified for an EBS volume on an EC2 instance. The validation throws a clear error message directing users to use Launch Templates instead.

Describe any new or updated permissions being added

No new or updated IAM permissions are needed.

Description of how you validated changes

Added a unit test that verifies the validation works correctly by attempting to create an EC2 instance with a GP3 volume that has throughput specified and confirming that the expected error message is thrown.

Checklist

• [x] My code adheres to the CONTRIBUTING GUIDE and DESIGN GUIDELINES


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 May 28, 2025 15:26
@github-actions github-actions bot added bug This issue is a bug. p1 labels May 28, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 28, 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.

(This review is outdated)

@aemada-aws aemada-aws self-assigned this May 30, 2025
@ozelalisen
Copy link
Member Author

@aemada-aws Thank you for your review! I fixed your comments.

@ozelalisen ozelalisen requested a review from aemada-aws May 30, 2025 10:55
@ozelalisen
Copy link
Member Author

Exemption Request: This pull request should be exempted from the integration test requirement as it only adds client-side validation warnings for the throughput property on EC2 instance block devices, which has been adequately validated through unit tests. The change doesn't modify any infrastructure behavior and focuses solely on improving developer experience by warning users when they attempt to use throughput settings that only work with Launch Templates.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label May 30, 2025
@aemada-aws aemada-aws added pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. labels May 30, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review May 30, 2025 15:59

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mergify
Copy link
Contributor

mergify bot commented May 30, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented May 30, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 34d2637
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 30, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit b31580a into aws:main May 30, 2025
16 checks passed
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2025
@ozelalisen ozelalisen deleted the ec2-throughput-for-ebs branch July 25, 2025 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. p1 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ec2: aws go cdk omits Throughput parameter for EBS block devices

3 participants