Skip to content

Commit

Permalink
add initial function template
Browse files Browse the repository at this point in the history
  • Loading branch information
gidsg committed Dec 23, 2024
1 parent 174be09 commit c4887c5
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Resources:
CloudFrontFunction:
Type: AWS::CloudFront::Function
Properties:
Name: EnforceBasicAuth
FunctionConfig:
Comment: A basic CloudFront function
Runtime: cloudfront-js-2.0
FunctionCode: |
function handler(event) {
// NOTE: This example function is for a viewer request event trigger.
// Choose viewer request for the event trigger when you associate this function with a distribution.
var response = {
statusCode: 200,
statusDescription: 'OK',
headers: {
'cloudfront-functions': { value: 'generated-by-CloudFront-Functions' }
}
};
return response;
}
AutoPublish: false

0 comments on commit c4887c5

Please sign in to comment.