Boto3 get EC2 instance's volume

前端 未结 5 558
既然无缘
既然无缘 2021-01-14 10:00

I am trying to get volume-id list of aws instance using boto 3, I am getting sort of collection manager but I don\'t know how to get the data inside.

import          


        
5条回答
  •  伪装坚强ぢ
    2021-01-14 10:15

    You can use cli also. Example I'm trying to get list of root volumes attached

    aws ec2 describe-volumes --filters "Name=attachment.device,Values=*sda1" --query "Volumes[*].[VolumeId]"  --output text --profile=my_genius_aws_profile
    

提交回复
热议问题