A promise-based javascript SDK that facilitates operations related to content stored in AWS S3 as well as cache invalidations in AWS cloudfront.
npm i @torus-tools/content
The example bellow publishes updated content to s3 and creates an invalidation in cloudfront for the updated assets.
const {listFiles, uploadContent} = require('@torus-tools/content')
let files = await ListFiles().catch(err=> console.log(err))
await uploadContent('yoursite.com', files, true, true).catch(err => console.log(err))