Skip to content

Commit

Permalink
update cf-reset-cache for blog
Browse files Browse the repository at this point in the history
Signed-off-by: Jessica Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Jun 6, 2015
1 parent cb49446 commit 66c9c3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
File renamed without changes.
10 changes: 9 additions & 1 deletion reset-cf-cache/reset-cache.py → cf-reset-cache/reset-cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@
items = []

for key in docs.list():
index_file = "/index.html"
if key.name.endswith((index_file)):
# append the file without the postfix as well
items.append(key.name.replace(index_file, ""))
items.append(key.name.replace(index_file, "/"))
items.append(key.name)

cf_conn = boto.connect_cloudfront(access_key, access_secret)
inval_req = cf_conn.create_invalidation_request(cloudfront_dist, items)

print "Invalidating these files: "
print items

print inval_req
sys.exit(0)
sys.exit(0)

0 comments on commit 66c9c3a

Please sign in to comment.