[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-s3-sqs-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":49,"s3URL":6,"services":58,"stem":59,"testing":60,"videoId":28,"__hash__":66},"patterns\u002Fpatterns\u002Fs3-sqs-cdk.json","Amazon S3 to Amazon SQS",null,{"headline":8,"text":9},"Cleanup",[10,11],"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>.",[13],"content\u002Fcontributors\u002Fjake-boggan.json",{"text":15},[16],"cdk deploy","Sends notifications from S3 to SQS when an object is created.","json","AWS CDK",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"s3-sqs-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fs3-sqs-cdk","serverless-patterns\u002Fs3-sqs-cdk","src\u002Fapp.py",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32],"This creates an S3 bucket and SQS queue. S3 writes a messages to the SQS queue when a new object is put into the bucket.","Python","100",{},{"icon1":37,"icon2":42,"line1":46},{"x":38,"y":39,"service":40,"label":41},20,50,"s3","Amazon S3",{"x":43,"y":39,"service":44,"label":45},80,"sqs","SQS",{"from":47,"to":48,"label":28},"icon1","icon2",{"headline":50,"bullets":51},"Additional resources",[52,55],{"text":53,"link":54},"Building resilient serverless patterns by combining messaging services","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbuilding-resilient-no-code-serverless-patterns-by-combining-messaging-services\u002F",{"text":56,"link":57},"Choosing between messaging services for serverless applications","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fchoosing-between-messaging-services-for-serverless-applications\u002F",{"from":40,"to":44},"patterns\u002Fs3-sqs-cdk",{"headline":61,"text":62},"Testing",[63,64,65],"1. Upload an object to the S3 bucket created by the deployment: \u003Ccode>aws s3 cp 'test_upload.txt'  s3:\u002F\u002F\u003CBUCKET_NAME>\u003C\u002Fcode>","2. In the console, check the SQS queue created by the deployment for new messages containing the S3 event.","3. You can also use the SQS CLI to fetch new messages from the queue: \u003Ccode>aws sqs receive-message --queue-url QUEUE_URL --max-number-of-messages 10\u003C\u002Fcode>.","seFquP7FCu7FClRAxABMbvgaDNkYBOLVPn7SZA1Z6CU",1778927710945]