Amazon AWS

From Prodigix Wiki
Revision as of 18:46, 31 January 2024 by 172.68.3.37 (talk)
Jump to navigation Jump to search

Creating Amazon S3 Bucket:


-Go to aws.amazon.com and log in using Amazon credentials.
-Once logged in, go to "Services" and click "S3" under the "Storage" section.
-Click "Create Bucket" on the top right.
-There are Five buckets needing to be created:

    "pdx-(companyname)-distributorimages"
    "pdx-(companyname)-documents"
    "pdx-(companyname)-productimages" (Location for SC images)
    "pdx-(companyname)-videos"
    "pdx-(companyname)-images"


-While creating the buckets in the Object Ownership section turn on the "ACLs Enabled" with the Bucket Owner Preferred option and uncheck the Block All Public Access to allow public access.
-After all buckets have been created, open a bucket and select the "Permissions" tab.
-In the permissions tab you will want to add a Bucket Policy by Editing the Bucket Policy.
-Copy and paste the following policy. Replace "companyname" and "bucketname".


NOTE: Make sure to include both { } brackets
{

   "Version": "2012-10-17",
   "Statement": [
       {
           "Sid": "PublicReadGetObject",
           "Effect": "Allow",
           "Principal": "*",
           "Action": [
               "s3:GetObject",
               "s3:ListBucket"
           ],
           "Resource": [
               "arn:aws:s3:::pdx-(companyname)-(bucketname)/*",
               "arn:aws:s3:::pdx-(companyname)-(bucketname)"
           ]
       }
   ]

}


-Once the bucket policies are added, click on the account name at the top right and in the drop down select "Security Credentials".
-Find the Access Keys section and click "Create Access Key". This will generate an Access Key and a Secret Key, make sure to save the Secret key as you will not see this key again.
-Copy both keys and go to the "ClientSettings" table on the client's SQL server.
-Paste the Access Key into the "AmazonS3AccessKey" setting string value.
-Paste the Secret Key into the "AmazonS3SecretKey" setting string value.
-Change "AmazonS3Enabled" setting numeric value = 1
-Change the "AmazonS3BucketName" setting string value to match the "companyname" from the buckets created.