Setup Amazon S3 Bucket On AWS Cloud

Amazon Simple Storage Service

Setup Amazon S3 Bucket 

Step 1 : Create S3 Bucket

Login to your AWS account and go to the "Services-->S3" then click on "Create Bucket". It will prompt you to provide bucket name whenever you create any s3 bucket always maintain format for bucket name which helps to manage multiple buckets in standard way.

Here we are using below format for s3 bucket name :

  • mysqldbbackups-AWS_ACCOUNT_NAME
s3-setup
s3-create

Step 2 : Create IAM User

Once the bucket is created, we need one user who has complete rights to access the bucket. 

To create user go to "Services-->IAM-->Users". 

After click on users give name of user here we are created user name as :

  • backupuser
s3-iam-user

Step 3 : Download S3 Credentials

Once you created iam user. you will get the credentials for that user which we need to configure s3 on server.

So carefully download this credentials on your system for further use.

Check below link to learn about the s3 server configuration :

s3-credentials

Step 4 : Create a User Policy

Create User policy and assign it to backup user. Go to : "Services -> IAM -> Policies -> Get Started."

  click on "Create your own policy" then add below policy. after adding policy first click on "validate policy" then click on "create policy".

s3-policy

After this add the below policy as it is in box.

Policy Name : S3CodeMediaDBBackupsFullAccess

Description   : Full Access of mysqldbbackups buckets.

Policy Document :

 {

   "Version": "2012-10-17",

   "Statement": [

       {

           "Effect": "Allow",

           "Action": "s3:*",

           "Resource": [

               "arn:aws:s3:::mysqldbbackups-AWS_ACCOUNT_NAME",

               "arn:aws:s3:::mysqldbbackups-AWS_ACCOUNT_NAME/*"

           ]

       }

   ]

}

s3-create-policy
s3-policy-add

Step 5 : Attache Policy

Go back to the "Services->IAM->Users" and click on backupuser and attached the above policy for user.

  • Permissions->Attach Policy->S3CodeMediaDBBackupsFullAccess
s3-attach

That's it. 

Our s3 bucket is ready to store backup files. This article is part of mysqldb backup files transfer from server to s3 bucket. 

Please find below related post :

 

Leave a Reply

Your email address will not be published. Required fields are marked *