Skip to main content

AWS Cloud IAM policy

Seqera accesses your AWS account through an IAM policy attached to the role or user in your AWS credentials. Create the policy first, then create the credentials that use it. Use this policy for AWS Cloud compute environments.

Policy​

To create and launch pipelines, explore buckets with Data Explorer, or run Studio sessions with the AWS Cloud compute environment, you must provide an IAM user with specific permissions. Some permissions are mandatory to create the compute environment and for it to function correctly. Others are optional. For example, some populate the lists of values that you select from in the Platform UI.

Attach permissions directly to an IAM user, or to an IAM role that the IAM user can assume when it accesses AWS resources.

The following broad, permissive policy includes all the required permissions for a quick start. Follow the principle of least privilege and grant only the permissions your use case needs, as shown in the statement reference.

Full permissive policy (for reference)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AwsCloudCreate",
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:TagRole",
"iam:TagInstanceProfile"
],
"Resource": [
"arn:aws:iam::*:role/TowerForge-*",
"arn:aws:iam::*:instance-profile/TowerForge-*"
]
},
{
"Sid": "AwsCloudCreatePassRole",
"Effect": "Allow",
"Action": [
"iam:PassRole"
],
"Resource": "arn:aws:iam::*:role/TowerForge-*"
},
{
"Sid": "AwsCloudLaunchEC2",
"Effect": "Allow",
"Action": [
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:DescribeInstances",
"ec2:RunInstances",
"ec2:TerminateInstances"
],
"Resource": "*"
},
{
"Sid": "AwsCloudLaunchLogs",
"Effect": "Allow",
"Action": [
"logs:GetLogEvents"
],
"Resource": "arn:aws:logs:*:*:log-group:*:log-stream:*"
},
{
"Sid": "AwsCloudLaunchS3",
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": "*"
},
{
"Sid": "AwsCloudDelete",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:ListAttachedRolePolicies",
"iam:ListRolePolicies",
"iam:DeleteRole",
"iam:DeleteInstanceProfile",
"iam:RemoveRoleFromInstanceProfile",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy"
],
"Resource": [
"arn:aws:iam::*:role/TowerForge-*",
"arn:aws:iam::*:instance-profile/TowerForge-*"
]
},
{
"Sid": "AwsCloudRead",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstanceTypes",
"ec2:DescribeKeyPairs",
"ec2:DescribeVpcs",
"ec2:DescribeImages",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups",
"s3:ListAllMyBuckets"
],
"Resource": "*"
},
{
"Sid": "AwsCloudUserdataCheck",
"Effect": "Allow",
"Action": [
"ec2:GetConsoleOutput"
],
"Resource": "*"
},
{
"Sid": "OptionalLineageIntegrationSNSAndS3",
"Effect": "Allow",
"Action": [
"sns:CreateTopic",
"sns:SetTopicAttributes",
"sns:Subscribe",
"sns:ConfirmSubscription",
"sns:Unsubscribe",
"sns:DeleteTopic",
"s3:CreateBucket",
"s3:GetBucketNotification",
"s3:PutBucketNotification",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:GetObject"
],
"Resource": [
"arn:aws:sns:*:*:seqera-lineage-*",
"arn:aws:s3:::seqera-lineage-*",
"arn:aws:s3:::seqera-lineage-*/*"
]
}
]
}

Download aws-cloud-full-policy.json

Intelligent Compute​

Intelligent Compute needs a second policy in addition to this one. See Intelligent Compute IAM permissions.

Create the policy in AWS​

Create the policy in the AWS account where Seqera creates or uses the resources.

  1. Open the AWS IAM console.
  2. From the left navigation menu, select Policies under Access management.
  3. Select Create policy.
  4. In the Policy editor section, select the JSON tab.
  5. Replace the default text in the policy editor with the policy on this page, adapted to your use case, then select Next.
  6. On the Review and create page, enter a name and description for the policy, then select Create policy.

Next, create AWS Cloud credentials with this policy attached.

Statement reference​

This section describes each statement in the policy: what Seqera uses it for, and whether it is optional.

Compute environment creation​

The following permissions are required to provision resources in the AWS account. The only resources to provision are the IAM roles that the EC2 instance assumes:

{
"Sid": "AwsCloudCreate",
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:TagRole",
"iam:TagInstanceProfile"
],
"Resource": [
"arn:aws:iam::*:role/TowerForge-*",
"arn:aws:iam::*:instance-profile/TowerForge-*"
]
},
{
"Sid": "AwsCloudCreatePassRole",
"Effect": "Allow",
"Action": [
"iam:PassRole"
],
"Resource": "arn:aws:iam::*:role/TowerForge-*"
}

Compute environment validation​

The following permissions are required to validate the compute environment when you create it. Seqera validates the input you provide and checks that the resource ARNs exist in the target AWS account:

{
"Sid": "AwsCloudValidate",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstanceTypes",
"ec2:DescribeImages",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups"
],
"Resource": "*"
}

Pipeline and Studio session management​

The following permissions are required to launch pipelines, run Studio sessions, fetch live execution logs from CloudWatch, download logs from S3, and stop the execution:

{
"Sid": "AwsCloudLaunchEC2",
"Effect": "Allow",
"Action": [
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:DescribeInstances",
"ec2:RunInstances",
"ec2:TerminateInstances"
],
"Resource": "*"
},
{
"Sid": "AwsCloudLaunchLogs",
"Effect": "Allow",
"Action": [
"logs:GetLogEvents"
],
"Resource": "arn:aws:logs:*:*:log-group:*:log-stream:*"
},
{
"Sid": "AwsCloudLaunchS3",
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::<BUCKET_NAME>/WORKDIR/*"
}

Compute environment termination and resource disposal​

The following permissions are required to remove resources created by Seqera when you delete the compute environment:

{
"Sid": "AwsCloudDelete",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:ListAttachedRolePolicies",
"iam:ListRolePolicies",
"iam:DeleteRole",
"iam:DeleteInstanceProfile",
"iam:RemoveRoleFromInstanceProfile",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy"
],
"Resource": [
"arn:aws:iam::*:role/TowerForge-*",
"arn:aws:iam::*:instance-profile/TowerForge-*"
]
}

Optional permissions​

The following permissions allow Seqera to populate values for drop-down fields. Without them, the input fields are not auto-populated, but you can still enter values manually. These permissions are optional but recommended, because manual entry is more error-prone. The s3:ListAllMyBuckets action also allows Data Explorer to auto-discover the data repositories accessible to your workspace credentials:

{
"Sid": "AwsCloudRead",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstanceTypes",
"ec2:DescribeKeyPairs",
"ec2:DescribeVpcs",
"ec2:DescribeImages",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups",
"s3:ListAllMyBuckets"
],
"Resource": "*"
}

Userdata script error detection (optional)​

Platform can retrieve the EC2 instance console output to detect errors in the userdata script that bootstraps the VM during instance startup. If the userdata script fails, Platform shows the failure as a warning on the workflow. Without this permission, Platform does not detect userdata script failures and shows no warning.

{
"Sid": "AwsCloudUserdataCheck",
"Effect": "Allow",
"Action": [
"ec2:GetConsoleOutput"
],
"Resource": "*"
}

Data lineage (optional)​

If you enable data lineage in your workspace, your Platform integration credentials must be able to create the notification topic and bucket notifications that the lineage service uses. Add the following permissions to the credentials:

{
"Sid": "LineageIntegrationSNS",
"Effect": "Allow",
"Action": [
"sns:CreateTopic",
"sns:SetTopicAttributes",
"sns:Subscribe",
"sns:ConfirmSubscription",
"sns:Unsubscribe",
"sns:DeleteTopic"
],
"Resource": "arn:aws:sns:<REGION>:<ACCOUNT_ID>:seqera-lineage-*"
},
{
"Sid": "LineageIntegrationS3",
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:GetBucketNotification",
"s3:PutBucketNotification",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::seqera-lineage-*",
"arn:aws:s3:::seqera-lineage-*/*"
]
}

If you manage your own EC2 instance role instead of letting Seqera create it automatically, see Custom instance profile for the minimum permissions to attach.