Skip to main content

Creating Policies

We will enact fine-grained control on both the source and destination buckets by giving only the required permissions to the read user, the write user (both used by the TitanQ solver) and the supervisor user (used by you to prepare requests and retrieve results).

This is accomplished by writing policies that will link an S3 resource to one or more permissions. Later on, we will attach these policies to users.

PolicyPermission(s)S3 ResourceUsed by
read policy on source bucketread (s3:GetObject)source bucketThe TitanQ solver read user
write policy on destination bucketwrite (s3:PutObject)destination bucketThe TitanQ solver write user
write policy on source bucketwrite (s3:PutObject)source bucketCustomer's supervisor user
read policy on destination bucketread (s3:GetObject)destination bucketCustomer's supervisor user

Read-Only Policy for source bucket

Go to the IAM dashboard (not the IAM Identity Center):

aws_menu_iam.png

Select the Policies submenu:

iam_policies.png

Select Create Policy:

iam_policy_create.png

Select the JSON edit mode and paste the following in the editor area:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::source-bucket-uniquename/*"]
}
]
}

where the Resource key should be adjusted to match your own source bucket ARN from the previous step.

Click Next

In the following "Review and Create Policy" dialog, enter a policy name, eg. myReadPolicy and click Create.

Write policy for the destination bucket

Do the same for the destination bucket, this time using the following JSON Policy description instead:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:PutObject"],
"Resource": ["arn:aws:s3:::dest-bucket-uniquename/*"]
}
]
}

Policies for the supervisor user

Once again, create two new policies:

  • write access to the source bucket called eg. supervisorWritePolicy
  • read access to the destination bucket called eg. supervisorReadPolicy

write permission to the source bucket:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:PutObject"],
"Resource": ["arn:aws:s3:::source-bucket-uniquename/*"]
}
]
}