Close Menu
Technoracle
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    TechnoracleTechnoracle
    • Home
    • AWS
      • EC2
      • Lightsail
      • RDS
      • S3
    • Ubuntu
      • Ubuntu 20.04
      • Ubuntu 22.04
    • AI Tools
    • Web Hosting
    • WordPress
    • Tech News
    Technoracle
    Home - AWS - How to Upload File to AWS EC2 Instance
    AWS

    How to Upload File to AWS EC2 Instance

    Rajesh ShivamBy Rajesh ShivamMarch 25, 2022Updated:June 12, 2023No Comments2 Mins Read
    Upload File to AWS EC2 Instance

    We can upload files or directories to AWS EC2 using different ways. In this article, I am going to explain step by step how to upload a file to AWS EC2 instance.

    Page Contents

    Toggle
    • Upload Files and Directories to AWS EC2 Instance
        • Method 1: Files upload using FTP Client
        • Method 2: Files upload to EC2 instance from windows.
        • Methode 3: Files upload using command prompt
          • For Ubuntu and Mac Users:
      • Conclusion

    Upload Files and Directories to AWS EC2 Instance

    Method 1: Files upload using FTP Client

    You can upload your files to the EC2 instance using FTP clients, such as FileZilla, WinSCP, etc. Your EC2 instance should have an FTP setup for this method. If you want to set up FTP on your EC2 instance check here.

    Method 2: Files upload to EC2 instance from windows.

    If you are using windows system, you can just download and install WinSCP to upload or download website files to AWS EC2 instance. To connect using WinSCP, you will need EC2 instance IP, server ssh key, user name.

    Methode 3: Files upload using command prompt

    If you are using Ubuntu, Mac or any linux based system, upload files using command prompt to AWS.

    For Ubuntu and Mac Users:
    • If you are using Ubuntu or Mac system, you can directly upload files from the local machine to the AWS EC2 instance using SCP command from the terminal.
    $ scp -i [login key file path] [Source Files] [username]@[Server IP]:[Destination]
    
    Example:
    
    $ scp -i serverlogin.pem file.zip [email protected]:~
    
    SCP: Secure Copy Protocol.
    -i: It is use to specify the new SSH Keypair.
    :~ ( colon tild): Tild(~) means the home directory in linux.
    • To download the file from the AWS EC2 instance to the local machine, use the following command.
    $ scp -i [login key file path] [username]@[Server IP]:/[Source Files Server] [Destination]
    
    $ scp -i serverlogin.pem [email protected]:/home/ubuntu/file.zip .
    
    . (dot): Here "."(dot) means the location from where you are running the command t download the (file.zip)
    
    

    Conclusion

    In this article, you have learned how to upload file to AWS EC2 instance. If you have any doubt, you can comment below. I will try to answer your questions.

    ubuntu tips
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit
    Previous ArticleHow to Install Let’s Encrypt SSL on Ubuntu 20.04 [Easy Guide]
    Next Article How to Check CPU Usage in Linux Easily
    Rajesh Shivam
    • LinkedIn

    Rajesh Shivam is a seasoned professional with expertise in AWS and Linux System Administration. With over 10 years of freelancing experience, he brings a wealth of knowledge to the table. Rajesh has a strong passion for technology and stays connected with the latest happenings in the field. His dedication and expertise make him a trusted resource for all things tech-related.

    Related Posts

    linux commands every user should know in 2025
    Ubuntu 24.04

    25 Must-Know Linux Commands Every User Should Master in 2025

    Read More
    Blog banner showing Ubuntu logo, coding laptop, and icons for VS Code, Docker, and Git with the title 'Perfect Dev Setup in Ubuntu 24.04 – Step-by-step guide for developers' on a dark tech-themed background.
    Ubuntu

    How to Set Up the Perfect Development Environment on Ubuntu 24.04

    Read More
    Convert PEM to PPK file
    AWS

    Convert PEM to PPK File on Windows & Linux [2025 Guide]

    Read More
    Add A Comment
    Leave A Reply Cancel Reply

    linux commands every user should know in 2025

    25 Must-Know Linux Commands Every User Should Master in 2025

    April 10, 2025
    TeamViewer and Ubuntu logos on gradient background – banner for how to install TeamViewer on Ubuntu 24.04 tutorial

    How to Install TeamViewer on Ubuntu 24.04 [Fast & Easy Steps]

    April 10, 2025
    Troubleshooting ‘Permission Denied (publickey)’ SSH error on a Linux server using secure terminal access

    Fix ‘Permission Denied (publickey)’ SSH Error on Linux [Step-by-Step Guide]

    April 8, 2025
    Blog banner showing Ubuntu logo, coding laptop, and icons for VS Code, Docker, and Git with the title 'Perfect Dev Setup in Ubuntu 24.04 – Step-by-step guide for developers' on a dark tech-themed background.

    How to Set Up the Perfect Development Environment on Ubuntu 24.04

    April 8, 2025

    Subscribe to Blog

    Enter your email address to subscribe to
    this blog and receive notifications of new posts by email.

    Facebook X (Twitter) Instagram Pinterest
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    © 2025 Technoracle

    Type above and press Enter to search. Press Esc to cancel.

    Click to Copy