<p>You are correct that the <code>describe-instances</code> API doesn't include information about ephemeral volumes. Once an instance is created, the only way to know that it has such volumes is available from the metadata service that is accessible from the instance itself.</p>

<p>According to <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#bdm-instance-metadata" rel="nofollow noreferrer">User Guide for Linux Instances</a>, the mapped ephemeral volumes are shown in <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html" rel="nofollow noreferrer">instance metadata</a>.</p>

<p>Since you created the instances using Chef, another option would be to check the Chef state database - most probably the information about a created instance includes the ephemeral device information. But this method highly depends on your Chef version and the cookbook you use to create the instances, so YMMV.</p>

CC BY-SA 3.0
2018-02-25T09:10:50.813Z
2018-02-26T18:30:30.747Z
2018-02-26T18:30:30.747Z
Evgeny Zislis
<p>I've got <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html" rel="nofollow noreferrer">ephemeral storage</a> setup in <em>Scalr</em> as part of the role. The instance is spinned up by <em>Chef</em> and it seems it is running fine (it's using <code>ephemeral0</code> device mounted as <code>D:</code> drive).</p>

<p>I've tried to use <code>aws ec2 describe-instances</code> command, but here is no any indication that the ephemeral device is attached to the instance (unless I don't know what I'm looking for).</p>

<p>How I can access ephemeral storages of the running instances using via AWS CLI/API?</p>

<chef><aws-cli><scalr>
How to access ephemeral storage of EC2 instance?
kenorb
# How to access ephemeral storage of EC2 instance?

(Asked by: username_0 on 2018-02-24)

I've got [ephemeral storage](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) setup in *Scalr* as part of the role. The instance is spinned up by *Chef* and it seems it is running fine (it's using `ephemeral0` device mounted as `D:` drive).

I've tried to use `aws ec2 describe-instances` command, but here is no any indication that the ephemeral device is attached to the instance (unless I don't know what I'm looking for).

How I can access ephemeral storages of the running instances using via AWS CLI/API?

**Tags:** chef, aws-cli, scalr


---

## 1 answers

### Answer by username_1 on 2018-02-25. Score: 1 | Accepted answer

You are correct that the `describe-instances` API doesn't include information about ephemeral volumes. Once an instance is created, the only way to know that it has such volumes is available from the metadata service that is accessible from the instance itself.

According to [User Guide for Linux Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#bdm-instance-metadata), the mapped ephemeral volumes are shown in [instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html).

Since you created the instances using Chef, another option would be to check the Chef state database - most probably the information about a created instance includes the ephemeral device information. But this method highly depends on your Chef version and the cookbook you use to create the instances, so YMMV.


---

