gitwtfhub

wtf is aws-cloudfront-samples?

fieldju/aws-cloudfront-samples — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2015-12-08

PythonAudience · ops devopsComplexity · 3/5DormantLicenseSetup · moderate

TL;DR

A Lambda function that automatically updates your AWS security group rules whenever CloudFront publishes new IP ranges, so only real CloudFront traffic gets through.

Mindmap

mindmap
  root((repo))
    What it does
      Watches CloudFront IP changes
      Updates security groups
      Runs as a Lambda function
    Tech stack
      Python
      AWS Lambda
      AWS Security Groups
    Use cases
      Restrict traffic to CloudFront
      Automate firewall updates
      Secure origin servers
    Audience
      Developers
      Cloud engineers
      Security teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Automatically restrict server access to only CloudFront IP ranges.

REASON 2

Keep AWS security group rules in sync with AWS's published IP list.

REASON 3

Tag specific security groups for automatic, hands-off updates.

What's in the stack?

PythonAWS LambdaAWS CloudFrontAWS Security Groups

How it stacks up

fieldju/aws-cloudfront-samples0xhassaan/nn-from-scratch100/praw
Stars0
LanguagePythonPythonPython
Last pushed2015-12-082015-09-26
MaintenanceDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity3/54/52/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires AWS credentials and tagging security groups correctly for the Lambda to find them.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Yoink these prompts

Prompt 1
Help me deploy this Lambda function to automatically update my AWS security groups when CloudFront IP ranges change.
Prompt 2
Explain how to tag my AWS security groups with Name: cloudfront and AutoUpdate: true so this function updates them.
Prompt 3
Walk me through setting up the AWS notification subscription this function needs to detect CloudFront IP range changes.

Frequently asked questions

wtf is aws-cloudfront-samples?

A Lambda function that automatically updates your AWS security group rules whenever CloudFront publishes new IP ranges, so only real CloudFront traffic gets through.

What language is aws-cloudfront-samples written in?

Mainly Python. The stack also includes Python, AWS Lambda, AWS CloudFront.

Is aws-cloudfront-samples actively maintained?

Dormant — no commits in 2+ years (last push 2015-12-08).

What license does aws-cloudfront-samples use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is aws-cloudfront-samples to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is aws-cloudfront-samples for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.