Setting Surrogate-Key headers for Amazon S3 origins
You can mark content with a surrogate key and use it to purge groups of specific URLs at once without purging everything, or purging each URL singularly. On the Amazon S3 side, you can use the
x-amz-meta-surrogate-key header to mark your content as you see fit, and then on the Fastly side set up a Header configuration to translate the S3 information into the header we look for.
Follow these instructions to set Surrogate-Key headers for Amazon S3 origin servers:
- Log in to the Fastly application.
Click the configure tab (wrench icon).
From the Service menu, select the appropriate service and then click the blue Configure button. The main controls for the selected service appear.
Click Content from the section list on the left.
In the Headers area at the top of the page, click the New button. The New Header window appears.
Fill out the New Header fields as follows:
- In the Name field, type a human-readable name for the header.
- From the Type menu, select Cache. From the Action menu, select Set.
- In the Destination field, type
- In the Source field, type
- From the Ignore If Set menu, select No.
- In the Priority field, type
Click the Create button to create your header.
To publish the new header, deploy the version of the service you are editing.