[{"data":1,"prerenderedAt":69},["ShallowReactive",2],{"pattern-s3-lambda-resizing-node":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":30,"introBox":31,"language":36,"level":37,"meta":38,"patternArch":39,"resources":53,"s3URL":6,"services":62,"stem":63,"testing":64,"videoId":35,"__hash__":68},"patterns\u002Fpatterns\u002Fs3-lambda-resizing-node.json","Resizing images uploaded to Amazon S3 with AWS Lambda (Node.js)",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\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\u002Fbenjamin-smith.json",{"text":15},[16],"sam deploy --guided","Create a Lambda function that resizes images uploaded to S3.","json","AWS SAM",{"template":21,"payloads":26},{"repoURL":22,"templateURL":23,"projectFolder":24,"templateFile":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fs3-lambda-resizing-node","serverless-patterns\u002Fs3-lambda-resizing-node","s3-lambda-resizing-node","template.yaml",[27],{"headline":28,"payloadURL":29},"Sample Lambda payload","3-lambda-lambda\u002Fevents\u002FinputFile.txt","true",{"headline":32,"text":33,"test":35},"How it works",[34],"The SAM template deploys a Lambda function, an S3 bucket and the IAM resources required to run the application. A Lambda function consumes \u003Ccode>ObjectCreated\u003C\u002Fcode> events from an Amazon S3 bucket. The Lambda code checks the uploaded file is an image and creates a thumbail version of the image in the same bucket.","","Node.js","200",{},{"icon1":40,"icon2":45,"line1":49},{"x":41,"y":42,"service":43,"label":44},20,50,"s3","S3",{"x":46,"y":42,"service":47,"label":48},80,"lambda","AWS Lambda",{"from":50,"to":51,"label":52},"icon1","icon2","ObjectCreated:*",{"headline":54,"bullets":55},"Additional resources",[56,59],{"text":57,"link":58},"Tutorial: Using AWS Lambda with Amazon S3","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-s3-example.html",{"text":60,"link":61},"Blog Series: Building scalable serverless applications with Amazon S3 and AWS Lambda.","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbuilding-scalable-serverless-applications-with-amazon-s3-and-aws-lambda\u002F",{"from":43,"to":47},"patterns\u002Fs3-lambda-resizing-node",{"headline":65,"text":66},"Testing",[67],"See the GitHub repo for detailed testing instructions.","DUlwLElzwa51XHWSr8wv5s9X1L6OJr0CejnRx-EzV4g",1778846887423]