• Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

VideoJS – multiple source demo

2022-03-08

Add custom field to Woocommerce tab

2022-03-07

Surror Product Tabs for WooCommerce

2022-03-07
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram Pinterest VKontakte
SEO & Website build tips SEO & Website build tips
  • Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact
SEO & Website build tips SEO & Website build tips
Home»Uncategorized»How to upload the file on S3 bucket via terminal?
Uncategorized

How to upload the file on S3 bucket via terminal?

OxfordBy Oxford2020-11-15Updated:2021-02-05No Comments3 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

For the ones who are not introduced to the world of S3 bucket, this article will guide you on how to upload the file on s3bucket through the terminal in Linux and assigning permission to it.

But before that let’s get a small overview on what S3 bucket is and in what ways the file can be uploaded on s3bucket.

S3 bucket is one of the many services provided by AWS. It is nothing but public cloud storage where you can store your files, kind of a folder in your pc but unlike pc, you can access it anywhere you want. S3 is an abbreviation of Simple Storage Service. AWS provides many ways to upload a file on the s3 bucket, which are given below:

  1. Upload file using Drag and Drop
  2. Upload file using click
  3. Upload file using aws CLI in the terminal.

From the above-mentioned ways, we are going to look into the 3rd way.

As a first step, you need to install aws CLI on your local machine. Here is the command to install it.

sudo apt install aws

Once the installation is done, please configure the aws with this command:

aws configure

As soon as you run the above command you will be asked the following details one by one in the terminal as you keep entering the correct values and press enter.

AWS Access Key ID: <S3_BUCKET_NAME>
AWS Secret Access Key: <AWS_SERVER_PUBLIC_KEY>
Default region name: <S3_BUCKET_REGION>
Default output format: json

After you enter the relevant information, your aws is configured.

Now onto uploading the file and to do that following command will help you achieve it.

aws s3 cp <path-to-file-from-local> s3://<S3_BUCKET_NAME>/<folder-name> --acl public-read

eg: aws s3 cp /home/nehalk/Desktop/file.txt s3://<S3_BUCKET_NAME>/resources — acl public-read

And voila! Your file, file.txt has been uploaded from Desktop folder of your local machine to resources folder in S3 bucket.

Another useful command is to permit the given file to download it.

aws s3api put-object-acl --bucket <S3_BUCKET_NAME> --key <path-to-file-on-s3-bucket> --acl public-read

This command will give the read permission to that and after that, you can download the file.

===========================

In order to use the AWS CLI with object storage service that provide an S3-compatible API like DigitalOcean Spaces, you must also configure a custom endpoint.

This can be done on the command line using the --endpoint flag:

aws s3 ls --endpoint=https://nyc3.digitaloceanspaces.com Worth pointing out that there's no way currently to have a default endpoint. You gotta specify it every time. I usually alias it for convenience: alias awsdo='aws --endpoint=https://nyc3.digitaloceanspaces.com' – Freedom_Ben Jun 12 '19 at 23:47
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Avatar photo
Oxford

Related Posts

nginx multi sub domain proxy

2021-06-05

How TO – Position Text Over an Image

2021-05-24

bootstrapstudio.io

2021-03-25

how to get wordpress theme getmetrix and google speed insight 100 scores?

2021-03-12
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
November 2020
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct   Jan »
Tags
app branding culture design digital Docly docs etc faq fashion featured fitness fix github Helpdesk Image issue leisure lifestyle magento Manual marketing memecached Photography picks planing seo sequrity tips Travel trending ui/ux web WordPress 爬虫
Editors Picks

Fujifilm’s 102-Megapixel Camera is the Size of a Typical DSLR

2021-01-05
Top Reviews
8.9

Review: Xiaomi’s New Loudspeakers for Hi-fi and Home Cinema Systems

By Oxford
8.9

Which LED Lights for Nail Salon Safe? Comparison of Major Brands

By Oxford
70

CES 2021 Highlights: 79 Top Photos, Products, and Much More

By Oxford
Advertisement
Demo
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
About Us
About Us

Your source for the lifestyle news. This demo is crafted specifically to exhibit the use of the theme as a lifestyle site. Visit our main page for more demos.

We're accepting new partnerships right now.

Email Us: [email protected]
Contact: +1-320-0123-451

Facebook Twitter Instagram Pinterest YouTube LinkedIn
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
From Flickr
Ascend
terns
casual
riders on the storm
chairman
mood
monument
liquid cancer
blue
basement
ditch
stars
© 2025 Designed by 九号资源网.

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