[{"data":1,"prerenderedAt":69},["ShallowReactive",2],{"pattern-apigw-http-sqs-lambda-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":29,"language":33,"level":34,"meta":35,"patternArch":36,"resources":54,"s3URL":6,"services":6,"stem":62,"testing":63,"videoId":6,"__hash__":68},"patterns\u002Fpatterns\u002Fapigw-http-sqs-lambda-cdk.json","Amazon API Gateway to Amazon SQS to AWS Lambda",null,{"text":8},[9,10,11],"1. In the source folder, from the command line enter:","\u003Ccode>cdk destroy\u003C\u002Fcode>","2. Confirm the removal and wait for the resource deletion to complete.",[13],"content\u002Fcontributors\u002Fpaul-lu.json",{"text":15},[16],"cdk deploy","Create an HTTP API that routes to SQS then Lambda","json","AWS CDK",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"apigw-http-api-sqs-lambda-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-http-api-sqs-lambda-cdk","serverless-patterns\u002Fapigw-http-api-sqs-lambda-cdk","infrastructure\u002Fapigw_http_api_sqs_lambda_stack.py",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32],"This pattern creates an Amazon API Gateway HTTP API with a send route that send message to a SQS queue. The Amazon API Gateway HTTP API has basic CORS configured. Upon receiving message, SQS will trigger a Lambda function to process the message. The function will only print the message only. The function written in Python.","Python","200",{},{"icon1":37,"icon2":42,"icon3":45,"line1":49,"line2":52},{"x":38,"y":39,"service":40,"label":41},20,50,"apigw","API Gateway HTTP API",{"x":39,"y":39,"service":43,"label":44},"sqs","SQS",{"x":46,"y":39,"service":47,"label":48},80,"lambda","AWS Lambda",{"from":50,"to":51,"label":28},"icon1","icon2",{"from":51,"to":53,"label":28},"icon3",{"bullets":55},[56,59],{"text":57,"link":58},"Using Lambda with Amazon SQS","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-sqs.html",{"text":60,"link":61},"Amazon API Gateway HTTP Integration subtype reference","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fhttp-api-develop-integrations-aws-services-reference.html","patterns\u002Fapigw-http-sqs-lambda-cdk",{"headline":64,"text":65},"Testing",[66,67],"Running following cURL command to agaist the HTTP API Endpoint:","\u003Ccode>curl -XPOST https:\u002F\u002F${HTTP_API_ENDPOOINT}\u002Fsend -d'{\"MessageBody\":\"hello\"}'\u003C\u002Fcode>","Ma9tt3TSRecolvRH8IpGWrbYZzU_9Xdp6cMSXg_3Aiw",1778927704945]