Scroll

Save photos to Amazon S3

Save photos to Amazon S3

Follow
Summary How to create a Amazon S3 bucket for multimedia files upload
Applies to Askia Design ; askiaface;
Written for Survey Designers
Keywords media capture ; amazon s3 ; askiaface iOS ; askiaface Android; photo ; video ; sound;

Prerequisites for multimedia Amazon S3 upload in Face for tablets 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):

 

{
    "Version": "2008-10-17",
    "Statement": [
    {
        "Sid": "AllowPublicRead",
        "Effect": "Allow",
        "Principal": {
            "AWS": "*"
        },
        "Action": "s3:GetObject",
        "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"

 

And Select:

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]".

Have more questions? Submit a request

Comments