There are more AWS SDK examples available in the AWS Doc SDK Examples
Add a cache control header to a CloudFront Functions viewer response event
The following code example shows how to add a cache control header to a CloudFront Functions viewer response event.