Before using AWS S3, we need to configure an AWS Bucket. Buckets are containers for data stored in S3. The identity pool ID will be required.

  • Create a gameobject called AWSManager and attach the AWSManager script to it

In Awake:

  • Initialize the AWS Manager with UnityInitializer.AttachToGameObject(gameObject);
  • Get the credentials

You can use Amazon Cognito to deliver temporary, limited-privilege credentials to your application, so that your users can access AWS resources

Amazon Cognito identities are not credentials. They are exchanged for credentials using web identity federation support in the AWS Security Token Service (AWS STS).

  • Create a new client
  • Create a new ListBucketsRequest. It returns a list of all buckets owned by the authenticated sender of the request

1 — CREATE A POLICY

  • Go to IAM (Identity and Access Management)
  • Click on Add Statement and later on Generate Policy. It will generate a JSON code. Copy it
  • IAM, Role, Select Role, Attach policies, Create policy

2 — ASSIGN POLICY TO THE ROLE

  • Go back to IAM, Roles, Select the role, Attach policies
  • Repeat 1 — Create a policy until you get a new JSON code to refresh it with an already added policy

Now enter in Play mode. The Debug.Log must return the Buckets list (in this case just 1)

Unity developer