Use IAM role instead of user credentials
Note
This feature requires Tower 21.06.0 or later.
AWS-based customers can configure Tower to interact with other AWS Services like Batch using an IAM Role rather than providing IAM User credentials.
Configure the Tower IAM policy#
Assumptions in Provided Policies
The provided policies were designed with certain assumptions:
- IAM Policy: Tower and Nextflow should have whole access to identified S3 Buckets.
- Trust Policy: The Role should be assumable by EC2, ECS, EKS, and only specifically-named IAM actors.
You may wish to limit S3 access to specific prefixes, and/or Role assumption to more specific Platforms.
Create a custom IAM Policy (Tower-Role-Policy.json).
Click to view custom Tower-Role-Policy.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
- Modify
BucketPolicy01
andBucketPolicy02
with the name(s) of the your S3 Buckets. - Revise (if necessary) the scope of access to a specific prefix in the S3 bucket(s).
Modify the Tower IAM Role Trust Policy (optional)#
Review and modify the Role Trust Policy (Tower-Role-Trust-Policy.json).
Click to view Tower-Role-Trust-Policy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
-
Replace
YOUR-AWS-ACCOUNT
with your own AWS Account Id. -
Specify the Users and/or Roles able to assume the Tower IAM Role.
Create the IAM artefacts#
Create the IAM Artefacts in your AWS Account.
- Navigate to the folder containing your configured IAM documents:
1 2 3 |
|
- Create the Role:
1 2 3 |
|
- Create an inline policy for the Role:
1 2 3 |
|
- Create an instance profile:
1 2 3 |
|
- Bind the Role to the instance profile:
1 2 3 |
|
Configure Tower#
With the IAM artefacts complete, update your Tower application configuration:
- Add the following entry to your
tower.env
1 2 3 |
|
-
Restart the Tower application.
-
Verify that the change took effect by querying the Tower instance
service-info
endpoint:
1 2 3 |
|
-
Log in to Tower and create a new AWS credential. You are now prompted for an AWS
arn
instead of access keys.Before Change:
After Change: