[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-cdk-fargate-sfn":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-sfn.json","AWS Fargate to AWS Step Functions",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 invokes Step Functions","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"fargate-sfn-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Ffargate-sfn-cdk","serverless-patterns\u002Ffargate-sfn-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 startExecution calls to an AWS Step Functions (SFN) state machine. 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 \u002Fstartexecution route for executing the state machine. Environment variables like the state machine ARN and AWS region are passed to the image to enable it to perform actions on the state machine.","This project also shows how to set up an Step Functions 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,"sfn","Step Functions",{"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},"AWS Step Functions","https:\u002F\u002Faws.amazon.com\u002Fstep-functions\u002F",{"from":43,"to":47},"patterns\u002Fcdk-fargate-sfn",{"headline":63,"text":64},"Testing",[65],"See the GitHub repo for detailed testing instructions.","omqETP3rjEUZkqwy44dLfxypspCoXs3TtAH9MibtnM8",1779791712444]