Skip to content

Instantly share code, notes, and snippets.

@TheMattSchiller
TheMattSchiller / cloudfront_invalidator.py
Created October 4, 2017 21:54
CloudFront Invalidator
from __future__ import print_function
import boto3
import time
def lambda_handler(event, context):
path = []
for items in event["Records"]:
if items["s3"]["object"]["key"] == "index.html":
path.append("/")
properties([
parameters([
string(name: '___')
])
])
env.REPO = ___
env.IMAGE = ___
env.TAG = ___