(ec2): support throughput option in EBS volume
See original GitHub issueFor EBS volumes with volume type GP3, the throughput in MiB/s can be configured. This is currently not supported in CDK.
Workaround: use escape hatches
Use Case
Set custom value for throughput, impacts performance and pricing.
Proposed Solution
The property is available in ebs volume and launchtemplate blockdevicemaping. It should be supported in both constructs.
Check if the property can be added to EbsDeviceOptionsBase
or only to one of its subclasses (EbsDeviceOptions
and EbsDeviceSnapshotOptions
). Nothing specific is mentioned in the documentation.
Display a warning if throughput is defined for a volume type that does not support specifying a throughput. Display an error if a throughput value is specified that is not supported.
Other
Originally mentioned as comment in issue #12020.
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:12 (7 by maintainers)
Top GitHub Comments
You can do something like:
This extends the type to include
throughput
where it will becomes rendered asThroughput
by the cdk as it transforms that property.There are other ways to get the throughput property rendered out with the resource but this is probably the easiest.
If you need to do get the compatibility for an ec2 volume you would do something like:
I also stumbled on this today for launch templates. Here’s the workaround:
I’m not sure why LaunchTemplate ebs supports throughput (doc), whereas instance ebs not (doc).
edit) I found the corresponding issue on CFn repo: https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/824