amazon web services - AWS CLI CloudFront Invalidate All Files -
i attempting invalidate entire static website. following command not seem invalidate /index.html , gives odd output of items invalided, shown below. aws cli behaviour normal or missing something? thanks!
aws cloudfront create-invalidation --distribution-id $distribution_id --paths /* output:
{ "invalidation": { "status": "inprogress", "invalidationbatch": { "paths": { "items": [ "/lib32", "/home", "/vmlinuz", "/core", "/proc", "/var", "/dev", "/usr", "/etc", "/initrd.img", "/cdrom", "/lost+found", "/root", "/tmp", "/lib", "/dead.letter", "/lib64", "/boot", "/sys", "/run", "/bin", "/sbin", "/mnt", "/opt", "/snap", "/media", "/copyright", "/srv" ], "quantity": 28 },
that's shell doing expansion of local filenames.
that's you're asking since * isn't quoted.
either specifying --paths '*' or--paths '/*'¹ intend. quoting wildcard keeps literal string rather you're seeing.
¹the cloudfront console allows specify either * or /* invalidate entire distribution; contrast, cli expects /*. this, in turn, because underlying api expects /*. when use * in console, leading slash silently added console before console makes request cloudfront api.
Comments
Post a Comment