View a markdown version of this page

Connecting to Amazon S3 - Amazon SageMaker Unified Studio

Connecting to Amazon S3

You can create a data connection to Amazon S3 when you need to directly access files stored in Amazon S3 buckets from your notebooks. This connection is only required if you want to read or write individual files (such as CSV, JSON, or Parquet files) directly from Amazon S3 storage. If you are working with Data Catalog tables that are backed by Amazon S3, you do not need to create a separate Amazon S3 connection, you can access those tables directly through the catalog.

To connect to Amazon S3
  1. In the navigation pane, choose Connections.

  2. Choose Create connection.

  3. In the gallery that opens, select Amazon S3.

  4. For Name, enter a descriptive name for your connection.

  5. (Optional) Enter the Amazon S3 URI. If you do not specify an Amazon S3 URI, SageMaker Unified Studio lists all buckets accessible with the provided credential.

  6. Enter the AWS Region where the Amazon S3 bucket is located.

  7. (Optional) Select an existing IAM role from the Access role ARN dropdown. If you are connecting to an Amazon S3 bucket in a different AWS account than your SageMaker Unified Studio domain, contact your administrator to configure an access role.

  8. Choose Create connection.

  9. If all validations pass, a new Amazon S3 connection will be created.

After creating the connection, you can use it in your notebooks to read and write files directly from the specified S3 location. You can also view all the buckets you connected to by selecting Data in the navigation pane and choosing the S3 buckets tab.

Verify the setup

After creating the connection, verify that the S3 Access Grants location was registered correctly:

  1. Navigate to the Amazon S3 console.

  2. In the left navigation, choose Access Grants.

  3. Choose View Details, then choose Locations.

  4. Confirm that the S3 URI is registered against the IAM role you created.

Note

If the connection failed to register the Amazon S3 Access Grants location, you must delete the existing connection and create a new one.