我在尝试使整个静态网站失效。以下命令似乎不能使/index.html
失效,并给出了一些奇怪的无法使用的输出,如下所示。这是AWS CLI的正常行为还是我漏掉了什么?谢谢!
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths /*
输出:
{
"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
},
aws-cli/1.11.36 Python/2.7.12 Darwin/16.4.0 botocore/1.4.93
上,使用--paths '*'
值会出现错误:An error occurred (InvalidArgument) when calling the CreateInvalidation operation: Your request contains one or more invalid invalidation paths.
应该改用--paths '/*'
才能成功响应。 - damusixMSYS_NO_PATHCONV=1
前缀。例如:MSYS_NO_PATHCONV=1 aws cloudfront create-invalidation ...
- Josh Woodcock