Thursday, 12 December 2019
File upload to S3 using aws php sdk
Step 1. Create AWS IAM user with s3 full access and api access only option
Step 2: Create a user Group with s3 full access
Step 3: Add AWS IAM user to to group created
Step 4: Finally on creating the user it will show you user credentials also one time download file with credential to use IAM user
Then go to iam user
Step 5: click on the user menu in the list, u can get the ARN - copy have it for further use
6. Next: Step is creating S3 bucket
7. Now Allow this bucket to access from IAM user using bucket policy
8. go to policy generator
https://awspolicygen.s3.amazonaws.com/policygen.html
This is like whom (IAM) to get access to what resource (S3)
generate policy and copy past to bucket policy in point 7.
Finally use php AWS sdk to access bucket from php code
Example:
https://gunabalans.blogspot.com/2019/09/aws-s3-file-upload-using-php-sdk.html
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment