-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(ec2): validate throughput property on EC2 instance block devices #34571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 Thank you for your review! I fixed your comments. |
|
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. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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). |
|
This pull request has been removed from the queue for the following reason: 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. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
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