Newton's Preposterous Miscalculation

    serverless-s3-replication-plugin

    1.0.2 • Public • Published

    Serverless S3 replication plugin

    serverless Coverage Status

    This is a serverless plugin to easily setup replications between AWS S3 buckets. The plugin allows you to set up single direction and/or bidirectional replication.

    The plugin will wait until all buckets from the configuration exist. If they all succeed, the plugin will modify the configured S3 buckets and add replication to them. Also, the required IAM roles will automatically be created for you. The IAM role follows the best practice to only have the permissions to resources it really needs. There will be a unique IAM role in each region.

    Install

    npm install --save-dev serverless-s3-replication-plugin

    Usage

    1. Configure the plugin in your serverless.yml
    plugins:
    - serverless-s3-replication-plugin
    1. Add the configuration for the plugin

    2.1. Single direction replication example

    custom:
      s3ReplicationPlugin:
        singleDirectionReplication:
          - sourceBucket:
              eu-west-1: my-bucket-jlsadjklsd-eu-west-1
            targetBuckets:
              - eu-west-2: my-bucket-jlsadjklsd-eu-west-2
              - eu-west-1: my-bucket-jlsadjklsd-sec-eu-west-1
          - sourceBucket:
              eu-central-1: my-bucket-jlsadjklsd-eu-central-1
            targetBuckets:
              - eu-west-1: my-bucket-jlsadjklsd-eu-west-1

    2.2. Bidirectional replication example

    custom:
      s3ReplicationPlugin:
        bidirectionalReplicationBuckets:
          - eu-west-1: my-bucket-jlsadjklsd-eu-west-1
          - eu-central-1: my-bucket-jlsadjklsd-eu-central-1
          - us-east-1: my-bucket-jlsadjklsd-us-east-1

    2.3. Hybrid architecture with bidirectional and single direction replication

    custom:
      s3ReplicationPlugin:
        singleDirectionReplication:
          - sourceBucket: 
              eu-west-1: my-bucket-jlsadjklsd-eu-west-1
            targetBuckets: 
              - eu-west-2: my-bucket-jlsadjklsd-eu-west-2
              - eu-west-1: my-bucket-jlsadjklsd-sec-eu-west-1
          - sourceBucket: 
              eu-central-1: my-bucket-jlsadjklsd-eu-central-1
            targetBuckets: 
              - eu-west-1: my-bucket-jlsadjklsd-eu-west-1
        bidirectionalReplicationBuckets:
          - eu-west-1: my-bucket-jlsadjklsd-eu-west-1
          - eu-central-1: my-bucket-jlsadjklsd-eu-central-1
          - us-east-1: my-bucket-jlsadjklsd-us-east-1

    Install

    npm i serverless-s3-replication-plugin

    DownloadsWeekly Downloads

    230

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    27.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • stefmorren