aws-instance-info - v0.2.1
    Preparing search index...

    Function getEC2Instances

    • Get multiple EC2 instances at once. More efficient than calling getEC2InstanceInfo multiple times for batch operations.

      Parameters

      Returns Map<EC2InstanceType, EC2InstanceDetails>

      Map of instance type to details

      import { getEC2Instances } from 'aws-instance-info'

      const instances = getEC2Instances(['m5.large', 'm5.xlarge', 'c7.2xlarge'])

      for (const [type, details] of instances) {
      console.log(`${type}: ${details.vCPUs} vCPUs`)
      }
      // m5.large: 2 vCPUs
      // m5.xlarge: 4 vCPUs
      // c7.2xlarge: 8 vCPUs