# Cloud Hosting

# CloudFront

Pozi uses CloudFront for managing the access to S3 buckets and EC2 instances etc. It handles things like adding CORS headers and document expiry settings.

# Cache Invalidation

If a CloudFront cache needs to be partially or fully cleared, either use the web interface or the command-line to create a cache invalidation (i.e. a instruction to clear the cache).

# Web Interface

# Command-line

Make sure that you have the AWS CLI utils installed on your machine and have created a profile with the relevant credentials for accessing the Pozi services (e.g. a profile called 'pozi').

  • Find the ID of the distribution that you are interested in using, e.g.:

    aws cloudfront list-distributions --profile pozi

  • Create the invalidation:

    aws cloudfront create-invalidation --profile pozi --distribution-id XXXXXXXXXXXXXXXX --paths "/https://config.pozi.com/*"

  • Track the progress using the ID that was provided after running the previous step:

    aws cloudfront get-invalidation --profile pozi --distribution-id XXXXXXXXXXXXXXXX --id YYYYYYYYYYYYYYYYYYY