The Seven Bridges Knowledge Center

The Seven Bridges Platform is a simple solution for doing bioinformatics at industrial scale. But sometimes, everyone needs a little help.

Get Started

Amazon Web Services Simple Storage Service (AWS S3) Volumes

This page contains information on configuring a volume that is associated with an S3 bucket in Amazon Web Services' (AWS) cloud storage.

Seven Bridges Platform authentication and authorization

Seven Bridges Platform provides the option of connecting your Amazon Web Services S3 bucket (volume) to be able to read and write files to and from the Platform. After connection is established, your S3 bucket (volume) behaves like your external storage for the Seven Bridges Platform. Authentication of the Platform is done through AWS Identity and Access Management (IAM) services and you can choose between two authentication options, IAM user or IAM role. Authorization of the Platform, which defines the actions that can be done on your volume, is defined in a custom IAM policy that is attached to an IAM user or IAM role.

About AWS IAM users

An AWS Identity and Access Management (IAM) User is an entity that you create to represent a person or service that uses it to interact with your AWS resources. For each IAM user you need to define one or more policies to determine what actions on which AWS resources and under what conditions that user can do. In order to connect your S3 bucket as a volume to the Seven Bridges Platform, you will need to attach an appropriate policy provided by Seven Bridges to your IAM user and use Access keys (access key ID and secret access key) for authentication to make programmatic calls from the Platform to your AWS resources.

About AWS IAM roles

An IAM Role is an entity, similar to an IAM user, that represents an AWS identity for which you set permission policies to define what other identity associated with your role can and cannot do with your AWS resources. A role is either intended to be assumed by more than one person or service. For connecting the Seven Bridges Platform with your S3 bucket, we recommend creating a role only for that purpose. A role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides temporary security credentials for your role session. The Platform automatically renews these IAM role credentials, so authorized users can access the volume without interruption.

Connecting an S3 bucket to the Platform

Prerequisites:

Procedure:

  1. Create a custom IAM policy
  2. Depending on your preferred authentication option:

Create a custom IAM policy

For both authentication methods, IAM user and IAM role, the same policy should be attached to them to define permissions that the Seven Bridges Platform will have when connecting with your AWS S3 bucket (volume). So, the first step is to create a custom IAM policy that you will attach to your IAM user or IAM role later on. To create the policy, follow these steps:

  1. Go to the AWS Management Console.
  2. In the top menu select Services and then choose IAM.
  3. In the left navigation menu select Policies.
  4. Click Create policy and select the JSON tab.
  5. Copy and paste the following custom policy. Make sure to select the right policy depending on whether you're mounting the volume in Read-only or Read-write mode. Also, make sure to replace <BUCKET_NAME> in the policy with the name of your S3 bucket, and either replace <ROOT> with the subdirectory in the bucket to which you want to restrict access when browsing the mounted volume from the Platform, or simply exclude the <ROOT> parameter and set Resource in the policy to  arn:aws:s3:::<BUCKET_NAME> if you want to make the entire content of the bucket available.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "GrantReadOnBuckets",
            "Action": [
                "s3:ListBucket",
                "s3:GetBucketCORS",
                "s3:GetBucketLocation"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<BUCKET_NAME>"
            ]
        },
        {
            "Sid": "GrantReadOnObjects",
            "Action": [
                "s3:GetObject"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<BUCKET_NAME>/<ROOT>/*"
            ]
        }
    ]
}
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "GrantReadOnBuckets",
            "Action": [
                "s3:ListBucket",
                "s3:GetBucketCORS",
                "s3:GetBucketLocation"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<BUCKET_NAME>"
            ]
        },
        {
            "Sid": "GrantReadOnObjects",
            "Action": [
                "s3:GetObject"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<BUCKET_NAME>/<ROOT>/*"
            ]
        },
        {
            "Sid": "GrantWriteOnObjects",
            "Action": [
                "s3:PutObject",
                "s3:GetObjectAcl",
                "s3:PutObjectAcl",
                "s3:AbortMultipartUpload",
                "s3:ListMultipartUploadParts"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<BUCKET_NAME>/<ROOT>/*"
            ]
        },
        {
            "Sid": "RequestReadOnCopySourceObjects",
            "Action": [
                "s3:GetObject"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::sbg-main/*",
                "arn:aws:s3:::sbg-main-us-west-2/*"
            ]
        }
    ]
}
  1. Click Review policy and enter a policy name, e.g. sb-access-policy (remember this policy name as you will need to attach it later to IAM user or IAM role).
  2. (Optional) Enter the policy description.
  3. Click Create policy to finish process of policy creation.

The custom IAM policy you have created can be attached to your IAM user or IAM role you will use to connect your AWS S3 bucket with the Seven Bridges Platform.

Set up an IAM user 

Follow these steps to create an AWS IAM user that you will use to connect an S3 bucket (volume) to the Seven Bridges Platform:

  1. Log in to the AWS Management Console.
  2. In the top menu select Services and then choose IAM.
  3. In the left navigation menu select Users, and then chooseAdd user.
  4. Enter the User name for the user you are creating.
  5. In the Access type section, select Programmatic access.
  6. Click Next: Permissions.
  7. In the Set permissions section select Attach existing policies directly.
  8. Use search bar to find and select the policy you created earlier (e.g. sb-access-policy)
  9. Click Next: Tags.
  10. (Optional) Add tags to the user. These are key-value pairs that contain additional information about the IAM user and are not necessary for the process of attaching a volume to the Seven Bridges Platform.
  11. Click Next: Review. The user details screen is displayed. Check once again that all entered information is correct.
  12. Click Create user. You will see a message that the user is successfully created.
  13. On the confirmation screen, copy the provided Access key ID and Secret access keyand use them for volume creation on the Seven Bridges Platform
  14. Click Close.

With the created IAM user you can connect your AWS S3 bucket as a volume to the Seven Bridges Platform. As stated in step 13 above, the credentials you will need are:

  • Access key ID 
  • Secret access key
    If you forget your Secret access key, you can still create new Access keys:
  1. Click on the name of your IAM user in the list of all available users
  2. Click theSecurity credentials tab
  3. In the Access keys section click Create access key. Newly created Access key ID and Secret access key are displayed in the pop-up window . Use them for connecting your S3 bucket to the Seven Bridges Platform.

Set up an IAM role 

Follow these steps to create an AWS IAM role that you will to connect an S3 bucket (volume) to the Seven Bridges Platform:

  1. Log in to the AWS Management Console.
  2. In the top menu select Services and then choose IAM.
  3. In the left navigation menu select Roles, and then chooseCreate role.
  4. In the Select type of trusted entitysection, choose Another AWS account.
  5. Enter the following values:
    • Account ID: 972028439221
    • Check Require External ID and enter at least 6 characters (strongly recommended).
  6. Click Next: Permissions.
  7. Use the search bar to find and select the policy you created earlier (e.g. sb-access-policy)
  8. Click Next: Tags.
  9. (Optional) Add tags to the role. These are key-value pairs that contain additional information about the IAM role and are not necessary for the process of attaching a volume to the Seven Bridges Platform.
  10. Click Next: Review
  11. Enter Role name and its optional description.
  12. Click Create role to complete the process of role creation. List of all available roles opens.
  13. Click the name of your newly created role to see the necessary details.
  14. Under the Trust relationships tab, click Edit trust relationship and replace the Policy Document with the policy shown below. Make sure to select the right policy depending on whether you have set an External ID in step 5 above. If you have configured an External ID, make sure to use its value instead of the <EXTERNAL_ID> placeholder in the policy below.
{
    "Version": "2012-10-17",
    "Statement": {
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::972028439221:user/sevenbridges_volumes"
        },
        "Action": "sts:AssumeRole",
        "Condition": {
            "StringEquals": {
                "sts:ExternalId": "<EXTERNAL_ID>"
            }
        }
    }
}
{
    "Version": "2012-10-17",
    "Statement": {
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::972028439221:user/sevenbridges_volumes"
        },
        "Action": "sts:AssumeRole"
    }
}
  1. Click Update Trust Policy to save the update.

If you followed all the steps described above you are ready now to connect your S3 bucket as a volume to the Seven Bridges Platform using the newly created IAM role. The credentials you will need are:

  • Role ARN - click the name of your role in the list of all roles and copy Role ARN.
  • External ID - click the Trust relationships tab. In the Conditions section, this is the value of the sts:ExternalId key.

External ID is an additional security parameter that will be used to authenticate the Seven Bridges Platform when accessing your AWS bucket. This parameter is not mandatory but is highly recommended.

Additional configuration

The IAM policy is usually sufficient to permit the Platform to access your S3 bucket. In certain situations, however, it may be necessary to set up additional configuration on the bucket itself. Read how to do this by enabling cross-origin resource sharing (CORS).

Updated about a month ago

Amazon Web Services Simple Storage Service (AWS S3) Volumes


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.