[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-cdk-fargate-sns":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-sns.json","AWS Fargate to Amazon SNS",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 interacts with SNS","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"fargate-sns-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Ffargate-sns-cdk","serverless-patterns\u002Ffargate-sns-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 publish calls to an Amazon Simple Notification Service (SNS) topic. 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, \u002Fsendmessage for publishing to the topic. Environment variables like the SNS Topic and AWS region are passed to the image to enable it to perform actions on the SNS Topic.","This project also shows how to set up an SNS 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,"sns","SNS",{"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 SNS","https:\u002F\u002Faws.amazon.com\u002Fsns\u002F",{"from":43,"to":47},"patterns\u002Fcdk-fargate-sns",{"headline":63,"text":64},"Testing",[65],"See the GitHub repo for detailed testing instructions.","qf8KYYaj2apt12SaAjHK5NcUXZaP6r_6D7vsKGsqS-0",1780569376741]