Amazon S3

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 Add Service in the left navigation pane.
  2. Select the S3 box. Enter the Service Name.
  3. Click Add service.
  4. Select the Amazon Region where you deployed your bucket (the US Standard region is us-east-1).
  5. 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.
  6. Click Save.


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 the S3 service under Services for which you wish to edit rules.
  2. Click the Rules tab.
  3. Click Add Rule.
  4. Set your rule Actions and When clause. For details on which pipeline stages are available for Amazon S3, see Pipelines and Amazon S3 Service.
  5. Click Save.

Pipelines and Amazon S3 Service

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

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


A pipeline can consist of stages that use different MongoDB Stitch services.

To learn how to implement the Amazon S3 service, see the Amazon S3 Javascript Tutorial.

←   MongoDB Rules Amazon SES  →