This article describes How to create am Amazon S3 bucket for multimedia files upload.
Prerequisites for multimedia Amazon S3 upload from AskiaFace tablet surveys:
- Amazon S3 account
- Bucket set in Ireland
AWS > Security, Identity & Compliance > Cognito
1/ Go to > Cognito > Manage Identity pools > Create new identity pool (ensure you have selected the region "EU (Ireland)" in upper right corner).
2/ When creating the new identity pool, it will prompt to create the two roles. Click on "allow".
AWS > STORAGE > S3
3/ Create the bucket (Region Ireland / eu-west-1 mandatory!).
Click on Next on "Configure Options":
Click on Next on "Set Permissions" (by default your account will be allowed to read and write):
And click on "Create Bucket" on Review:
4/ Then select the bucket you just created:
And go to "Permissions" > Bucket Policy:
And copy and paste this (with the name of your bucket):
"Resource": "arn:aws:s3:::NAME OF YOUR BUCKET/*"
AWS > Security, Identity & Compliance > IAM
5/ Check the roles (auth and unauth) > IAM > Roles:
6/ Select the role "[xxx]unauth_Role" >Attach policies
and click on "create Policies"
Service = S3
Actions: All S3 Actions:
Then Click on resources "you choose actions that require the bucket resource type" > Add ARN to restrict Access > With the bucket name:
And do the same for Object:
Click on "Review Policy", give a name to the policy and click on "Create Policy"
Then, go back to Roles > Select the "[xxx]unauth_Role" and attach the policy you just created:
DESIGN > SCREEN MODE > MEDIA CAPTURE OPTIONS
7/ Enter the bucket and ID in design (element properties > media capture)
User name : your bucket name
Password: identity pool ID (you can get it through Cognito > manage identity pools > your pool > Sample code). Should start with "eu-west-1:[guid]".