Search code examples
amazon-web-servicesamazon-route53amazon-ebs

Get ARN of EC2/EBS Volume


I need an EBS Volume ARN to specify it when creating a resource set with Route 53 Recovery Application Controller. But EBS Volumes don't have this attribute.

enter image description here

Here's an example description of an EBS Volume:

In:

aws ec2 describe-volumes --volume-ids vol-03303bf453f8d7ee5

Out:

{
    "Volumes": [
        {
            "Attachments": [],
            "AvailabilityZone": "ap-southeast-1a",
            "CreateTime": "2021-11-03T15:43:40.087000+00:00",
            "Encrypted": false,
            "Size": 1,
            "SnapshotId": "",
            "State": "available",
            "VolumeId": "vol-03303bf453f8d7ee5",
            "Iops": 100,
            "VolumeType": "gp2",
            "MultiAttachEnabled": false
        }
    ]
}

Solution

  • This is the format that worked for me:

    arn:[partition]:ec2:[region]:[account-id]:volume/[volume-id]
    

    For example:

    arn:aws:ec2:ap-southeast-1:123456789123:volume/vol-03303bf453f8d7ee5