A third party program is needing to access static files from our CDN. The issue is, instead of fetching these files via GET, they are making this request via POST.
When testing this POST => cdn.company.com/somefile
, I get-
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>MethodNotAllowed</Code>
<Message>The specified method is not allowed against this resource.</Message>
<Method>POST</Method>
<ResourceType>OBJECT</ResourceType>
</Error>
The CloudFront behavior is set to support all methods-
And the CORS configuration includes the POST method-
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<MaxAgeSeconds>2592000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Not sure what else needs to be done. My suspicion is that S3 (correctly) assumes a POST is trying to add information to the bucket, where it should just return the file at the path. Is this possible with cloudfront to s3? Do I need to forward the request to a lambda which will download the file instead?