CloudFront invalidation of path when using S3 static website default index
Recently, a modification for CF invalidation was added so it was possible to invalidate files from a custom origin CF distribution that used S3 as custom origin.
Unfortunately, s3cmd wouldn't invalidate the path in CF when the uploaded file in S3 is the default index.
So, I modified it to automatically retrieve the default index name, detect if the invalidation path uses it and modify the query accordingly.
I also added two new flags to modify this behavior:
When using default index, invalidate path
Corrected the new flags for CF index invalidation