How to configure the Amazon S3 file system?
To use amazon s3 file system follow the procedure mentioned below:
1. Firstly, login into the AWS dashboard. And select the s3 service from the services list.
2.Then click the Create bucket button.
- Input your bucket name, AWS Region
- Click create bucket button to create bucket
3. Search iAm User from the top search bar. And go to the user list.
- Create add users
- Input user name and select Access key – Programmatic access
- Click next: permissions
- Click Attach existing policies directly tab
- Search from policies list with “AmazonS3FullAccess”
- Select AmazonS3FullAccess
- Click Next: Tags
- Click Next: Review
- Click Create User
- You’ll find AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY
- Copy these id & key
4. Now you need to make your bucket public & generate a policy for accessing.
- Go to your bucket page and go to permission tab
- Scroll down to Block public access (bucket settings) and click edit.
- Uncheck Block all public access and click save changes. A confirm dialog will be opened. Type confirm and click confirm
- Then Scroll down to Bucket policy and create edit
- Click policy generator button
- A new tab will be opened.
- Select s3 bucket policy from Select Type of Policy
- Input * in Effect field
- Select GetObject in Actions dropdown
- Input arn:aws:s3:::bucket_name/* in Amazon Resource Name (ARN)
- Replace bucket_name with your bucket name in Amazon Resource Name (ARN)
- Click add statement
- Click generate policy
- A dialog will be opened with a policy code. Copy that code & go to the previous tab.
- Input copied code in bucket policy and click save changes
5. Go to you the shop admin panel > settings > File System Configuration
6.Input those id and key in AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY field
7. Input your bucket name in AWS_BUCKET field
8. For AWS_DEFAULT_REGION go to your bucket list and check url(check below screenshot) & input that in AWS_DEFAULT_REGION field
9. And input AWS_URL like this format https://bucket_name.s3.default_region.amazonaws.com
10. And save these information & enable S3 File System Activation.