Added logic to invalidate AWS CloudFront Distribution after each S3 deployment.
The CloudFront Distribution needs to be invalidated after each deployment in order to trigger a refresh of all the various endpoint caches in different geographies. Without this, stale files will be cached at the end points which will only be refreshed over time. Invalidations take a few minutes to propagate and ensure end users are served the latest deployed code as soon as possible.
Flags
The following secrets will need to be added to the repo.
Changes
Added logic to invalidate AWS CloudFront Distribution after each S3 deployment.
The CloudFront Distribution needs to be invalidated after each deployment in order to trigger a refresh of all the various endpoint caches in different geographies. Without this, stale files will be cached at the end points which will only be refreshed over time. Invalidations take a few minutes to propagate and ensure end users are served the latest deployed code as soon as possible.
Flags
The following secrets will need to be added to the repo.
The invalidation is created after each deployment to S3 and can be seen here: https://console.aws.amazon.com/cloudfront/v3/home?region=us-east-1#/distributions/ENZKBANCEVDP6/invalidations