- Published on
Using Amazon S3 to share your media
- Authors
- Name
- PatharaNor
Requirement
- AWS's account
Setting
- Create bucket via https://s3.console.aws.amazon.com/s3/buckets. Set your bucket name, the other options use default setting.
- After created, access into your bucket then go to Permissions. Slide down to Block public access box.
- Uncheck Block all public access option then press Save changes.
- Slide down to Bucket policy box then press Edit button to allow public read by paste
JSON
below into text box :
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
}
]
}
note : don't forget change YOUR_BUCKET_NAME
to your bucket and save the setting.
- After saved, you should see red notice
Publicly accessible
in your bucket.
- Now you ready to share your media to user.