Skip to content

jpolara2016/Lambda-S3-Replication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Lambda-S3-Replication

These two different lambda functions will allow you to copy objects to another bucket when there is a put event, and delete objects when there is a delete event in the source bucket.

There are 2 functions for copying and deleting objects so use it accordingly however it meets your needs.

Requirements

  1. IAM Role Policy:
{
  "Version": "2012-10-17",
  "Id": "Policy1591045332632",
  "Statement": [
      {
          "Sid": "Stmt1618270933950",
          "Action": "s3:*",
          "Effect": "Allow",
          "Resource": "arn:aws:s3:::jpolara1-*/*"
      },
      {
          "Sid": "Stmt1617806794444",
          "Action": [
              "logs:CreateLogGroup",
              "logs:CreateLogStream",
              "logs:PutLogEvents"
          ],
          "Effect": "Allow",
          "Resource": "arn:aws:logs:*:*:*"
      }
  ]
}
  1. AWS Lambda fucntion copy_objects (Python3.8)
  2. AWS Lambda fucntion delete_objects (Python3.8)
  3. Configure Lambda Trigger for your functions

Releases

No releases published

Packages

No packages published

Languages