Also, if you use the AWS command line interface (CLI) for invalidating objects and you specify a path that includes the The maximum length of a path is 4,000 characters.You can't use a wildcard within the path; only at the end of the path.For more information, see Amazon Cloud Front Pricing.If the invalidation path is a directory and if you have not standardized on a method for specifying directories—with or without a trailing slash (/)—we recommend that you invalidate the directory both with and without a trailing slash, for example, You can use the Cloud Front console or Cloud Front API actions to create and run an invalidation, display a list of the invalidations that you submitted previously, and display detailed information about an individual invalidation.
Using the console, you can display a list of the last 100 invalidations that you've created and run for a distribution.
For more information about the charges for invalidation, see Paying for Object Invalidation.
To control the versions of objects that are served from your distribution, you can either invalidate objects or give them versioned file names.
If you want to invalidate selected objects but your users don't necessarily access every object on your origin, you can determine which objects viewers have requested from Cloud Front and invalidate only those objects.
To determine which objects viewers have requested, enable Cloud Front access logging.