Skip to main content

Posts

Showing posts from November, 2022

Allow others to upload files in your Amazon S3 bucket

  Allow others to upload files in your Amazon S3 bucket Let us explore how can we allow others to upload files in our AWS account using AWS console 01. Create user - Login to to AWS console --> Select IAM --> Users --> Add User --> Username -->  Password   02. Create Amazon s3 bucket --> Select S3 --> Create Bucket --> Bucket Name --> Create Bucket Note:  Keep Check Box Checked for Block All public Access, and other options as default.   03. Create Amazon s3 bucket policy --> Select Bucket --> Bucket Policy --> Edit --> Add following bucket policy as follows. Note: Make sure to replace Bucke_Name with your actual bucket name. {     "Version": "2012-10-17",     "Statement": [         {             "Sid": "AllowToListBucket",             "Effect": "Allow",             "Principal": {                 "AWS": "arn:aws:iam::<YourAmzon 12 Digit A/c No.>

Find out S3 Bucket URL

 Find out S3 Bucket URL  Amazon supports   01. Virtual hosted-style URL 02. path-style URLs Virtual hosted-style URL -    https://bucket-name.s3.region-code.amazonaws.com/<file-name> Path-style URL -  https://s3.region-code.amzonaws.com/bucket-name/file-name But what is the easiest way to find out the bucket URL from AWS console 01. Create bucket in S3   02. Create folder inside the bucket   03. Check / select folder on the left most side of the folder       04. Select  Copy URL This URL will be the hosted-style URL of the folder test in your bucket, which is in us-west-1 region https://<bucket-name>.s3.us-west-1.amazonaws.com/test/ Ref.: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html