Amazon S3 Service

Amazon S3 is a component of Amazon Web Services providing a simple key-value store especially useful for storing and serving static resources.

To set up an Amazon S3 service in MongoDB Stitch:

  1. Click Services in the left navigation pane and click Add Service.
  2. Select the S3 box. Enter the Service Name.
  3. Select the Amazon Region where you deployed your bucket (the US Standard region is us-east-1).
  4. Enter your Amazon Access Key ID and Secret Access Key. To see how you can view and manage your AWS keys, see Managing Access Keys for your AWS Account.
  5. Click Add service.


You must specify rules to enable the S3 actions. The rules must evaluate to true to enable the action. For details on Amazon S3 Service rule construction and syntax, see Amazon S3 Service Rules.

To specify rules for your Amazon S3 Service:

  1. In the left navigation pane, click Services and then the S3 service for which you wish to edit rules.
  2. Click the Rules tab.
  3. Click New Rule.
  4. Set your rule Actions and When clause. For details on which function stages are available for Amazon S3, see Functions and Amazon S3 Service.
  5. Click Save.

Functions and Amazon S3 Service

MongoDB Stitch provides the ability to define a sequence of actions to perform as a function. For the Amazon S3 service, MongoDB Stitch provides the following actions:

Action Description
s3Service.put() Uploads a binary data to an S3 bucket.
s3Service.signPolicy() Generates a document that contains the policy, signature, and credential, which you can use to issue a POST request directly to S3.