15 lines
628 B
Markdown
15 lines
628 B
Markdown
---
|
|
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
|