Skip to content

Commit de5e3f8

Browse files
committed
Adding readme to repo
1 parent 0e813c1 commit de5e3f8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
**AWS CloudFront Cache Invalidation**
2+
3+
This is a small function that can be invoked to invalidate the cache of a CloudFront Distribution.
4+
5+
Updated slightly from the aws-cloudfront-cache-invalidation script to send a response to CodePipeline on success.
6+
7+
The purpose of this function is to be called as required as a standalone function when you need your cache invalidated and the functionality is not in-built to the tool or service you are using.
8+
**Example**: This function is called during the Deploy stage of a CodePipeline to invalidate the cache of a CloudFront Distribution for a static website hosted in Amazon S3
9+
10+
**How to use**
11+
1. Create a new **Lambda** function
12+
2. Select **Python 3.8** as the runtime
13+
3. Copy the source code into your function
14+
4. Create execution role and assign permissions to your cloudfront distribution
15+
5. Create an **Environment Variable** with a _key_ of DISTRIBUTION_ID and a _value_ of your CloudFront Distribution
16+
6. Deploy function
17+
18+
19+
**Note**
20+
This function invalidates the entire cache. To select paths update the **items* sections within the function

0 commit comments

Comments
 (0)