Use Case for AWS EBS GP2 Volume
Quick Links
- Configure AWS EBS GP2 Volume
- Use Case for AWS EBS GP2 Volume
- Triage Guides by Violation Type
AWS EBS GP2 Volume
Why You Should Use This Policy
Using the GP2 volume type for EBS on AWS can be less cost-effective and have lower performance when compared to the GP3 volume type. This policy helps identify outdated GP2 volumes, enabling you to upgrade them to the more efficient and modern GP3 type.
Pros
- Cost Efficiency: GP3 volumes are generally more cost-effective than GP2 volumes.
- Performance: GP3 offers better performance characteristics over GP2 for many use cases.
- Resource Management: Helps manage and update infrastructure to the latest standards.
Cons
- Manual Upgrade Required: Identified GP2 volumes will need to be manually upgraded to GP3 to realize benefits.
Policy Details
This policy observes a given AWS Elastic Block Store (EBS) volume to determine if it is using the gp2
type, which is considered outdated. The observations are then evaluated, and if the volume is using gp2
, a violation is recorded. This process involves two phases: observation and policy expression.
Variables
- vars: This is currently not used directly but can be future-proofed for thresholds or additional settings.
Violation Types
- GP2_VOLUMES: This violation is raised when an EBS volume is identified as using the
gp2
type.
How the Policy Works
Observation
The observation phase retrieves details of the specified EBS volume using the AWS SDK. In particular, it fetches the VolumeId
and VolumeType
. These details form the basis of the observance used in the next phase.
Policy Expression
The policy expression phase evaluates the observance data to determine if the volume is of type gp2
. If it is, the policy records a violation of type GP2_VOLUMES
.
Example
An example ARN for an EBS volume that could be observed:
arn:aws:ec2:us-west-2:123456789012:volume/vol-0abcd1234efgh5678