Connect to your EC2 Instance
- SSH Connection: Open your terminal or command prompt and use the SSH command to connect to your EC2 instance. Replace
your-ec2-instance-ip
with the public IP address of your EC2 instance, andyour-ec2-key.pem
with the path to your private key file:
ssh -i /path/to/your-ec2-key.pem ec2-user@your-ec2-instance-ip
- Click attach after selecting the instance to which you want it to attach. The instance has now been given access to your volume. Now use the instructions below to connect to the root.
$ sudo su
$ cd
- You can now list the disk available on your EC2 instance by firing the below command.
lsblk
- If you want to check whether the disk is mounted to the server or not. You can use the below command
$ df -h
How to Attach and Mount an Extra Volume to an Linux Instance in AWS?
EBS is a block type durable and persistent storage that can be attached to EC2-instances for additional storage. Unlike EC-2 instance storage volumes which are suitable for holding temporary data EBS volumes are highly suitable for essential and long term data. EBS volumes are specific to availability zones and can only be attached to instances within the same availability zone.