[{"data":1,"prerenderedAt":58},["ShallowReactive",2],{"pattern-cdk-fargate":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":43,"s3URL":6,"services":51,"stem":52,"testing":53,"videoId":29,"__hash__":57},"patterns\u002Fpatterns\u002Fcdk-fargate.json","AWS Fargate",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","Deploying an AWS Fargate service","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"fargate-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Ffargate-cdk","serverless-patterns\u002Ffargate-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 fronted by an Application Load Balancer.","This builds on the tutorial at AWS CDK Creating an AWS Fargate service using the AWS CDK by showing how to add 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 used is a simple hello world Node Js application. This project also provides an example of how to pass an environment variable to the image. Note that the image can be changed to other images that suit your use case by changing the codes found in the src directory.","Node.js","200",{},{"icon1":40},{"x":41,"y":41,"service":42,"label":5},50,"fargate",{"headline":44,"bullets":45},"Additional resources",[46,48],{"text":5,"link":47},"https:\u002F\u002Faws.amazon.com\u002Ffargate\u002F",{"text":49,"link":50},"AWS Compute Blog: Fargate","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fcategory\u002Fcompute\u002Faws-fargate\u002F",{"from":42,"to":42},"patterns\u002Fcdk-fargate",{"headline":54,"text":55},"Testing",[56],"Retrieve the Fargate Service endpoint from the \u003Ccode>cdk deploy\u003C\u002Fcode> output to view the `hello world Serverless Fargate response` from the browser.","1FUv3PbfTVZ90Cs08VkvjJzpDyoKlWsYEAuB0tVGjSI",1778927706643]