# Transfer files to and from your EC2 instance

To transfer files between your local machine and an EC2 instance, you will need **scp** (secure copy) available on your machine.
The command to transfer files from your machine to your EC2 instance is:

```
scp -i ./path_to_your_key_pair_cer_files ./path_to_file_which_you_want_transfered ec2-user@public_IPv4_dns_of_your_ec2_instance:path_in_EC2
``` 

The command to transfer files from your EC2 instance to your local machine is very similar, you need to swap the two paths:

```
scp -i ./path_to_your_key_pair_cer_files ec2-user@public_IPv4_dns_of_your_ec2_instance:path_in_EC2 ./path_to_file_which_you_want_transfered
``` 
