add the old snippet md files

This commit is contained in:
Travis Shears 2025-06-05 16:20:57 +02:00
parent fc0dd204c7
commit bcf8313a4b
110 changed files with 3048 additions and 0 deletions

View file

@ -0,0 +1,15 @@
---
title: "aws cloudfront invalidation sync"
date: 2020-01-11T04:41:11+01:00
draft: false
snippet_types: ["aws"]
---
```shell
$ aws cloudfront create-invalidation --distribution-id E29OAXKYAP0NP8 --paths /work/
```
Pairing well with the sync is invalidating the CDN so that the live site is updated immediately with the S3 bucket. Like everything these days, there is a cost involved with this operation so if I'm not in a rush I often avoid it. Also you can reduce cost by using **--paths** only invalidating needed routes.
inspiration:
[lustforge](https://lustforge.com/2016/02/27/hosting-hugo-on-aws/) - great blog post