When datasets are withdrawn by submitters, we need the ability to signal that the dataset is "gone" (HTTP 410) rather than not found (HTTP 404).
Approach
We can leverage Lambda@Edge to customize the dataset download experience that is currently being handled by Cloudfront. For example, trying to download a withdrawn datasets will now always return a 404 due to the artifacts being removed. With Lambda@Edge we could query our REST API (the datasets endpoint) and return a 410.
Motivation
When datasets are withdrawn by submitters, we need the ability to signal that the dataset is "gone" (HTTP 410) rather than not found (HTTP 404).
Approach
We can leverage Lambda@Edge to customize the dataset download experience that is currently being handled by Cloudfront. For example, trying to download a withdrawn datasets will now always return a 404 due to the artifacts being removed. With Lambda@Edge we could query our REST API (the datasets endpoint) and return a 410.