Here is a simple method for invalidating files from a previous CloudFront distribution, using the AWS CLI:

aws cloudfront create-invalidation --distribution-id E3JB0DQOWLEGFO --paths /*

This includes the distribution id, and specifies the path of files to invalidate, here a wildcard to indicate all files, but specific filenames may also be included, such as /images/logo.png.

To use with a named profile, add the --profile option as follows:

aws cloudfront create-invalidation --profile myprofilename --distribution-id E3JB0DQOWLEGFO --paths /*