How can I ensure that my CloudFront content does not contain any DELETE requests to my origin?

Restrict user permissions from deleting objects from my S3 origin or bucket.


Answers

  • crystralRamirez
    crystralRamirez ✭✭✭✭✭
    The allowedMethods controls which HTTP methods CloudFront processes and forwards to a designated origin. One type of allowedMethod allows Cloudfront to forward  GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests.

    FIND aws_cloudfront_distribution WITH allowedMethods = 'DELETE' AND origins $= 's3.amazonaws.com' 
      THAT CONNECTS aws_s3_bucket

This Month's Leaders