Use AWS Command Line Interface CLI for creating, copying, retrieving and deleting files from AWS S3

preview_player
Показать описание
Click here to subscribe:

How to use AWS command line interface for creating , copying , retrieving, and deleting files from the cloud ( Amazon S3) using the #AWSCLI
In this tutorial I am going to help you use the AWS Command Line Interface (CLI) to access Amazon S3. We will do this so you can easily build your own scripts for backing up your files to the cloud and easily retrieve them as needed. This will make automating your backup process faster, more reliable, and more programmatic. You can use this information to build a scheduled task (or cron job) to handle your backup operations.
Note: This tutorial builds upon the concepts from the #Backing_Up_Your_Files to #AmazonS3 tutorial. If you haven't done that tutorial yet, you should complete that tutorial first. The tutorial is given in the I button or also you can check out the description box for the S3 tutorial.

Step 1: Create an AWS IAM User
In this step, using the IAM service you will create a user account with administrative permission. In later steps you will use this user account to securely access AWS services using the AWS CLI.

a. login to your AWS management console using your username and password. After login type IAM in the search bar and select IAM to open the Identity and Access Management dashboard.
b. From the AWS Identity and Access Management dashboard, click on Users on the left side
c. Click the Add user button.
d. Enter a user name in the textbox next to User name: (we’ll use AWS_Admin for this example) and select Programmatic access in the Select AWS Access Type section. Click the Next: Permissions button.
e. Click on Attach existing policies directly option. Select AdministratorAccess then click Next: Review.
f. Click on Create user.
Step 2: Install and Configure the AWS CLI
Now that you have your IAM user, you need to install the AWS Command Line Interface (CLI).
You can install AWS CLI for both windows or Mac/Linux Computer. Below are instructions based on the windows computer system
a. Download and run the Windows installer (64-bit or 32-bit).
The download link is given in the description
Note: users of Windows Server 2008 v6.0.6002 you will need to use a different install method that is given in the description.

Open a command prompt by pressing the Windows Key + r to open the run box and enter cmd and press the OK button.
Type aws configure and press enter. When prompted, enter the following:
Note: this should look something like AKIAPWINCOKAO3U4FWTN
Note: this should look something like 5dqQFBaGuPNf5z7NhFrgou4V5JJNaWPy1XFzBfX3
Default region name [None]: enter us-east-1
Default output format [None]: enter json
Step 3: Using the AWS CLI with Amazon S3
In this step, you will use the AWS CLI to create a bucket in S3 and copy a file to the bucket.

a. Creating a bucket is optional if you already have a bucket created that you want to use. To create a new bucket named my-first-backup-bucket type:
aws s3 mb s3://my-first-backup-bucket
Note: bucket naming has some restrictions; one of those restrictions is that bucket names must be globally unique (e.g. two different AWS users can not have the same bucket name); because of this, if you try the command above you will get a BucketAlreadyExists error.

Or, use the original syntax if the filename contains no spaces.

Congratulations! You have set up an IAM user, configured your machine for use with the AWS command line interface and you have learned how to create, copy, retrieve, and delete files from the cloud.
IF you liked the video do hit the subscribe button and click on the bell icon.
Download link for AWS CLI:

Amazon s3 tutorial:

Installation guide of AWS CLI for windows server 2008:

What is AWS CLI?
how to use AWS cli for configuring aws S3 bucket?
Рекомендации по теме
Комментарии
Автор

Thanks, solved what I was trying for 2 hours. I work with maps and have to upload more than 400, 000 PNGs tiles.

Автор

Great video. I am an IT for a small business, so my files are uploaded inside our bucket. How am I able to create a document so I can run command and deploy it to my team? Any help would help

akaslowsayone
Автор

Hi- i have list of some 4000 folders that i need to move to another bucket. how do i upload the list?

qpyzjnq
Автор

hi, how can i integrate and call powershell script to run ?

ahindia
Автор

explanation is good no need of that music. its disturbing.

anweshabanerjee