This template creates a gateway response for a 404 status code. It sets the response parameters for Access-Control-Allow-Origin and Access-Control-Allow-Headers, and associates it with a specific REST API.

CloudFormation Template