Use the AWS SDK to store content on Amazon S3

In this tutorial, we will set up an API connector to interact with an Amazon S3 bucket.

Set up Your Secrets

Since your bot will use an AWS service, you will need access keys with access to Amazon S3. You will also need to know the region where your S3 bucket is.

You can then create a secret for a Cross-Account role for your bot and connectors to use.

Build your SDK Connector

We will need to build an API connector from the existing Amazon Simple Storage Service blueprint.

  • In the ServisBOT portal, click on API Connectors
  • On the top right, click on Create Connector and then select From Blueprint
  • Scroll down to select the Amazon Simple Storage Service blueprint

S3 API connector from Blueprint

When prompted, fill out the API connector form with a sensible name and description, the secret we created a few minutes ago, and your desired S3 method (e.g. GetObject, PutObject, etc). You can see the full list of S3 methods in the official documentation.