[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-cdk-fargate-eventbridge":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":13,"deploy":15,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":30,"language":36,"level":37,"meta":38,"patternArch":39,"resources":52,"s3URL":6,"services":60,"stem":61,"testing":62,"videoId":29,"__hash__":66},"patterns\u002Fpatterns\u002Fcdk-fargate-eventbridge.json","AWS Fargate to Amazon EventBridge",null,{"headline":8,"text":9},"Cleanup",[10,11,12],"1. Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>.","3. You see a message confirming DELETE_COMPLETE.",[14],"content\u002Fcontributors\u002Fglenn-chia-jin-wee.json",{"text":16},[17],"cdk deploy","Create an AWS Fargate service that sends events to EventBridge","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"fargate-eventbridge-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Ffargate-eventbridge-cdk","serverless-patterns\u002Ffargate-eventbridge-cdk","cdk\u002Flib\u002Fcdk-stack.ts",[28],{"headline":29,"payloadURL":29},"",{"headline":31,"text":32},"How it works",[33,34,35],"This project contains a sample AWS Cloud Development Kit (AWS CDK) template for deploying an AWS Fargate service running on an Amazon Elastic Container Service (ECS) cluster with an Application Load Balancer in-front. The AWS Fargate service makes putEvents calls to an Amazon EventBridge Event Bus. This template uses a custom image without having to pre-push the image to Amazon Elastic Container Registry (ECR) or another container library. This makes use of the in-built ecs.ContainerImage.fromAsset method.","The custom image has a base route \u002F for health checks, and \u002Fputevents route for putting events to the event bus. Environment variables like the event bus name and AWS region are passed to the image to enable it to perform actions on the event bus.","This project also shows how to set up an CloudWatch Events Interface Endpoint to the VPC. A VPC Endpoint policy is created to only allow the Fargate task definition to perform actions through the VPC endpoint.","TypeScript","200",{},{"icon1":40,"icon2":45,"line1":49},{"x":41,"y":42,"service":43,"label":44},20,50,"fargate","AWS Fargate",{"x":46,"y":42,"service":47,"label":48},80,"eventbridge","EventBridge",{"from":50,"to":51,"label":29},"icon1","icon2",{"headline":53,"bullets":54},"Additional resources",[55,57],{"text":44,"link":56},"https:\u002F\u002Faws.amazon.com\u002Ffargate\u002F",{"text":58,"link":59},"Amazon EventBridge","https:\u002F\u002Faws.amazon.com\u002Feventbridge\u002F",{"from":43,"to":47},"patterns\u002Fcdk-fargate-eventbridge",{"headline":63,"text":64},"Testing",[65],"See the GitHub repo for detailed testing instructions.","2zs0EhLpBXT1xkOK_rx0YIK5ZH92wnveLovCBASQTMc",1778846883536]