Setting up AWS S3 - Cloud

Before you can start using the app, you need to fill in the necessary details for your S3 bucket and AWS instance. The S3 bucket is where the app will store all the templates that are being used.

You will first need to setup an S3 bucket. Then, there are two main pieces of information you will need before you can use it. You will need to setup AWS Cognito to get Identity pool information and you will also need AWS api tokens.

Setting up an AWS S3 Bucket

First, create an AWS account. Once you have done that, login and click on the services tab on the top left to get the following menu

Click on the S3 option under storage where you will be brought to the S3 dashboard page. Click “Create Bucket” to create a new bucket.

Give your bucket a name and be sure to pick a region suitable to your current location. Remember you bucket name, it will be important later on. Hit “Create” in the bottom left to create your bucket. If you would like to further customize your bucket, you can do that but it is not within the scope of this tutorial.

After you have created your bucket, click on your bucket to enter into it. We will need to edit the permissions of the bucket before we can use it. Click on permissions in the top menu bar to edit it.

After this, click on “CORS Configurations” to get the following menu. Paste in the following text and save the configuration by clicking the button in the top right.

<?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>DELETE</AllowedMethod> <AllowedMethod>HEAD</AllowedMethod> <ExposeHeader>ETag</ExposeHeader> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>

Congratulations, you have now setup a bucket.

Setting up AWS Cognito

Click the servies tab in the top left to bring up the menu again. This time look for the Cognito Service under Security, Identity and Compliance. You can use the search bar on top if you want.

You will then be brought to the following page. Select “Manage Identity Pool” and create a new identity pool.

Now fill in the name of your identity pool and enable access to unauthorized identities. Once you are ready, click create pool in the bottom right.

Once you have completed this, you should be brought to a dashboard page. If you click to the sample code option on the left, and then select Javascript in the dropdown, you should see some sample code in the box. Copy and write down these two values highlighted in red, the region and the identity pool id. Make sure you save the two pieces of data without the single quotation marks at either end. You want just the information inside.

Congratulations, you now have the the necessary security pool information

 

Setting up an AWS Security Key/API Token

Click your userID in the top right to bring down a dropdown. Click on “My Security Credentials”.

Scroll down to the section on access keys for cli, sdk and api access and click on create access key.

Now it will give you a popup with two values. Save both of these.

 

Congratulations, you have all the necessary information to begin using the app.

If you go to the config page of the app, you can fill in these details and begin using it.