User having the Cloud Front Policy
{
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": [
"cloudfront:CreateInvalidation",
"cloudfront:GetInvalidation",
"cloudfront:ListInvalidations"
],
"Resource": "*"
}
]
}
But getting error as : AWS CloudFront Error An error occurred (NoSuchDistribution) when calling the CreateInvalidation operation: The specified distribution does not exist.