Objective: Set the policy permissions!
As our current set up runs it now prints out “AWS Error.” This is because of access granted permissions. We need to setup the permission so we can access the S3 server. On your AWS account open the Identity and Access Management Console (IAM).
On the left side of the screen, select ‘Roles’
Now select the unauthenticated role.
We need the Role ARN code, also known as our Principle, copy it.
We need to create Role Policy. Click Add permission then Create Inline Policy.
Select choose service select S3, All S3 actions (s3:*)
Under Resources select All Resourses.
Select Review policy
name the policy and create policy. Go back to Roles, select the unauthorized role, add permission, select your custom policy and attach policy.
Navigate back to S3. Select your bucket and select permission at the top.
Scroll down to ‘Bucket policy’ this is where we are going to define our access level to our S3 storage. Select Edit then select policy generator.
Set the type of policy to S3 Bucket Policy
Effect needs to be on ‘Allow’ and in principal paste the Role ARN Code.
Under actions we could create user roles if we wanted to, and you can limit the usability of access and what you can do on that server. For our purposes we want to allow everything so select all actions.
The Amazon Resource Name (ARN) is arn:aws:s3:::”your bucket’s name”/*
Select Add Statement then select Generate Policy. This is going to give us a Json file.
Select everything in the Json file and copy it and go back to Bucket Policy and paste inside and select save.
Now you can navigate back to Unity and now the console will print out the bucket name.
We have successfully granted access to AWS services. We can now access that storage and have the ability to download and upload information! I’ll see you in the next tutorial!