Categories
AWS Linux

How to Reveal instanceType in AWS Fargate

AWS Fargate is a serverless compute service that abstracts the underlying infrastructure, including the instanceType. This can be challenging when you need to determine the exact type of instance your container is running on. However, there’s a straightforward way to uncover this information.

You can reveal the hidden instance type by accessing the container (or pod) and executing a specific command:

cat /sys/devices/virtual/dmi/id/product_name

Why This Works

The file /sys/devices/virtual/dmi/id/product_name contains hardware information provided via the Desktop Management Interface (DMI). Even in Fargate, this data is passed through the virtualization layer, making it accessible from within the container or pod.

Leave a Reply

Your email address will not be published. Required fields are marked *