[{"data":1,"prerenderedAt":73},["ShallowReactive",2],{"pattern-alb-lambda-rest-api-sam-py":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":28,"level":29,"meta":30,"patternArch":31,"resources":45,"s3URL":6,"services":6,"stem":68,"testing":69,"videoId":6,"__hash__":72},"patterns\u002Fpatterns\u002Falb-lambda-rest-api-sam-py.json","ALB with route-based listener rules to AWS Lambda",null,{"text":8},[9],"\u003Ccode>sam delete\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fbalasubrahmanya-balakrishna.json",{"text":13},[14],"sam validate && sam build && sam deploy --guided","This pattern creates an Application Load Balancer with route-based listener rules, paired with an AWS Lambda function as the target.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Falb-lambda-rest-api-sam-py","serverless-patterns\u002Falb-lambda-rest-api-sam-py","alb-lambda-rest-api-sam-py","template.yaml",{"headline":25,"text":26},"How it works",[27],"Deploy an Application Load Balancer, with routes that direct traffic to an AWS Lambda function. The function uses the AWS Lambda Powertools for Python library. The Lambda function records details of the incoming ALB event, along with the API and context objects, logging them to an Amazon CloudWatch Logs log group and Amazon X-Ray.","Python","200",{},{"icon1":32,"icon2":37,"line1":41},{"x":33,"y":34,"service":35,"label":36},20,50,"alb","Application Load Balancer",{"x":38,"y":34,"service":39,"label":40},80,"lambda","AWS Lambda",{"from":42,"to":43,"label":44},"icon1","icon2","route-based listener",{"bullets":46},[47,50,53,56,59,62,65],{"text":48,"link":49},"AWS CLI","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Fuserguide\u002Finstall-cliv2.html",{"text":51,"link":52},"SAM CLI","https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fserverless-sam-cli-install.html",{"text":54,"link":55},"Python 3","https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F",{"text":57,"link":58},"AWS SAM build image for Python 3.9","https:\u002F\u002Fgallery.ecr.aws\u002Fsam\u002Fbuild-python3.9",{"text":60,"link":61},"Docker Desktop","https:\u002F\u002Fwww.docker.com\u002Fproducts\u002Fdocker-desktop\u002F",{"text":63,"link":64},"Using AWS Lambda with an Application Load Balancer","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fservices-alb.html",{"text":66,"link":67},"Powertools for AWS Lambda (Python)","https:\u002F\u002Fdocs.powertools.aws.dev\u002Flambda\u002Fpython\u002Flatest\u002F","patterns\u002Falb-lambda-rest-api-sam-py",{"text":70},[71],"See the GitHub repo for detailed testing instructions.","CE-17vgBLB6pmvroXJKtJS7v3qMpw871S8CafCFj2-Q",1778846880765]