[{"data":1,"prerenderedAt":59},["ShallowReactive",2],{"pattern-cloudfront-lambdafunctionurl-oac-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":27,"language":31,"level":32,"meta":33,"patternArch":34,"resources":48,"s3URL":6,"services":6,"stem":53,"testing":54,"videoId":6,"__hash__":58},"patterns\u002Fpatterns\u002Fcloudfront-lambdafunctionurl-oac-sam.json","Amazon CloudFront Origin Access Control for AWS Lambda Function URL",null,{"text":8},[9,10],"sam delete","See the GitHub repo for detailed cleanup instructions.",[12],"content\u002Fcontributors\u002Fshekhar-shrinivasan.json",{"text":14},[15,16,17],"sam build","sam deploy --guided","See the GitHub repo for detailed build and deploy instructions.","Access your Lambda Function URLs securely using Amazon CloudFront Origin Access Control","json","AWS SAM",{"template":22},{"repoURL":23,"templateURL":24,"projectFolder":25,"templateFile":26},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fcloudfront-lambdafunctionurl-oac-sam","serverless-patterns\u002Fcloudfront-lambdafunctionurl-oac-sam","cloudfront-lambdafunctionurl-oac-sam","template.yaml",{"headline":28,"text":29},"How it works",[30],"The SAM template sets up a CloudFront Distribution with a Lambda function URL as the origin. An Origin Access Control (OAC) specific to Lambda is created and linked to the CloudFront Distribution, ensuring that only CloudFront can access the Lambda function URL. The template also configures appropriate invoke permissions for the Lambda function. The Origin and Cache Behavior settings in the CloudFront Distribution are optimized for best practices when using a Lambda function URL as the origin.","Node.js","200",{},{"icon1":35,"icon2":40,"line1":44},{"x":36,"y":37,"service":38,"label":39},20,50,"cloudfront","Amazon CloudFront",{"x":41,"y":37,"service":42,"label":43},80,"lambda","AWS Lambda",{"from":45,"to":46,"label":47},"icon1","icon2","function URL",{"bullets":49},[50],{"text":51,"link":52},"Amazon CloudFront now supports Origin Access Control (OAC) for Lambda function URL origins","https:\u002F\u002Faws.amazon.com\u002Fabout-aws\u002Fwhats-new\u002F2024\u002F04\u002Famazon-cloudfront-oac-lambda-function-url-origins\u002F","patterns\u002Fcloudfront-lambdafunctionurl-oac-sam",{"text":55},[56,57],"Access the Lambda function URL both through the CloudFront distribution and directly, then observe the results.","See the GitHub repo for detailed testing instructions.","kEhU8kZ2X4QtAK0ZCOAUGo7cSfldmYGmbG-huH_Ez5Q",1778846883774]