Skip to content

Lambda Function to integrate Bitbucket repo to S3 bucket

Notifications You must be signed in to change notification settings

lcsmontiel/bitbucket2s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node v6.10.3 Lambda Function to integrate Bitbucket as S3 Bucket.

Activating S3 Bucket Versioning you can use it to triggering push event to AWS CodePipeline

HOW TO

Remove .example from example's filename below and set properly the parameters

./config/bitbucket.json.example
./config/s3.json.example

Install packages

Run the following command with Node Version 6.10.3

npm install

Zip project root without main-tree (only config, node_modules, index.js, etc...)

Upload it to a Lambda Function with the following role

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "<YOUR BUCKET ARN HERE>"
        }
    ]
}

Send "reponame","branch" and "owner" to event payload of Lambda Function

Let's do it!

About

Lambda Function to integrate Bitbucket repo to S3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published