Skip to content

An AWS Lambda function that will make public buckets private.

License

Notifications You must be signed in to change notification settings

stewmi/aws-cwe-publicbuckets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Bucket Compliance Automation

Build Status

Overview

Summary

This Lambda function will listen, using CloudWatch Events, to a Config rule that is triggered to be non-compliant if a public-read or public-write policy is found.

Once a Non-Compliant Bucket is found, it will add a private bucket acl to the bucket and then message the bucket policy, if found, to an SNS topic that administrators can subscribe to.

Serverless Application Model

Github Repository

SAM Webinar

AWS Serverless Application Model (AWS SAM) prescribes rules for expressing Serverless applications on AWS.

Deployment

  1. Pre Requisites:
  • Install Python

    brew install python

  • Install awscli

    pip install awscli

  • Configure Credentials

    aws configure

  • Create an S3 Bucket for deployments

    bucket=$(aws s3 mb s3:https://your-awesome-deployment-bucket --output text | sed 's/make_bucket: //')

  1. Package the application

aws cloudformation package --template template.yml --s3-bucket $bucket --output-template-file packaged-template.yml

  1. Deploy the application

aws cloudformation deploy --template-file /path/to/packaged-template.yml --stack-name stop-the-data-leaks --capabilities CAPABILITY_IAM

Contributing

  1. Create a Feature Branch
  2. Make Improvements
  3. Create Pull Request and notify current owner.

About

An AWS Lambda function that will make public buckets private.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages