Randomly Expressed

About

Welcome to my blog “randomly expressed”. I created this website to publish helpful tips. It’s mainly technology driven, but I will blog about other topics. I am a Unix sysadmin that is always looking to learn new things. My goal is to be able to share knowledge that others may find useful. xkcd.com

Continue Reading »

Contact

Connect With US

Connect with us on the following social networking sites.

Most Popular Posts.

Add Some Content to This Area

You should either deactivate this panel on the Theme Settings page, or add some content via the Widgets page in your WordPress dashboard.

AWS EC2 describe-instance

By on October 12, 2019 in Technology with No Comments

To get a list of all the EBS volumes IDs and device names for your EC2 instance run the following. I obfuscated the instance ID and volume ID in my example.

aws ec2 describe-instances --instance-ids i-012345 --query 'Reservations[*].Instances[*].[Tags[?Key==Name].Value,InstanceId,BlockDeviceMappings,DeviceName[*].Ebs.VolumeId]' --output text --profile us-prod-west-2

i-012345	None
gitlab-geo-or
/dev/sda1
EBS	2018-03-06T00:18:06.000Z	True	attached	vol-0000000000
/dev/sdb
EBS	2018-03-06T00:18:06.000Z	False	attached	vol-1111111111
/dev/sdf
EBS	2018-05-29T19:07:36.000Z	False	attached	vol-22222222222
/dev/sdg
EBS	2018-09-27T17:50:19.000Z	False	attached	vol-333333333333

Facebook Comments

Post a Comment

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

Top