EC2 Not EBS Optimized

  • Query id: d991e4ae-42ab-429b-ab43-d5e5fa9ca633
  • Query name: EC2 Not EBS Optimized
  • Platform: Pulumi
  • Severity: Info
  • Category: Best Practices
  • URL: Github

Description

It's considered a best practice for an EC2 instance to use an EBS optimized instance. This provides the best performance for your EBS volumes by minimizing contention between Amazon EBS I/O and other traffic from your instance
Documentation

Code samples

Code samples with security vulnerabilities

Postitive test num. 1 - yaml file
name: aws-eks
runtime: yaml
description: An EKS cluster
resources:
  example:
    type: aws:ec2:Instance
    properties:
      instanceType: t2.micro
      monitoring: true
      ebsOptimized: false
---
name: aws-eks
runtime: yaml
description: An EKS cluster
resources:
  example:
    type: aws:ec2:Instance
    properties:
      instanceType: t2.micro
      monitoring: true

Code samples without security vulnerabilities

Negative test num. 1 - yaml file
name: aws-eks
runtime: yaml
description: An EKS cluster
resources:
  example:
    type: aws:ec2:Instance
    properties:
      instanceType: t2.micro
      monitoring: true
      ebsOptimized: true
---
name: aws-eks
runtime: yaml
description: An EKS cluster
resources:
  example:
    type: aws:ec2:Instance
    properties:
      instanceType: t3.nano
      monitoring: true