It is a plugin that can easily delete the CloudFront cache.
Setting is easy with only 2 steps.
Configure IAM
Set a CloudFront distribution ID for this plugin
安装:
From the WP admin panel, click “Plugins” -> “Add new”.
In the browser input box, type “Clear CloudFront Cache”.
Select the “Clear CloudFront Cache” plugin and click “Install”.
Activate the plugin.
Set IAM for AWS resources where WordPress is running
IAM setting example
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "cloudfront:CreateInvalidation",
"Resource": "*"
}
]
}