Using SNS and SQS for Infrastructure Automation

We deploy the real environment, you take the scenario-based labs on us. Hands-on, from anywhere, at any time.

Time required: 2 Hours


In this lab, we are going to simulate sending an s3:ReducedRedundancyLostObject event to Amazon's Simple Notification Service (SNS). When this sends, it contains information about an object that was "lost" due to the Reduced Redundancy Storage (RRS) class type being selected for your objects. We know that RRS has 99.99% durability instead of the standard "eleven nines," and in real environments, it is best practice to store objects that are "easily reproducible" on RRS storage class to reduce costs. We will then automate the "reaction" of the objects if one is lost and the s3:ReducedRedundancyLostObject event will be sent to SNS. Solution { "Service":"Amazon S3", "Event":"s3:ReducedRedundancyLostObject", "Time":"2014-10-13T15:57:02.089Z", "Bucket":"bucketname", "Key":"lol_cat.jpg", "RequestId":"5582815E1AEA5ADF", "HostId":"8cLeGAmw098X5cv4Zkwcmo8vvZa3eH3eKxsPzbB9wrR+YstdA6Knx4Ip8EXAMPLE" }


You run an image manipulating service for cats. The service allows the user to upload photos of cats and your service automatically applies a black and white filter. According to best practices, we will store the cat pictures on Amazon S3 standard storage class, so they have eleven nines durability. However, to reduce costs, we store the black and white images that our service creates with RRS (reduced redundancy storage). We have enabled the s3:ReducedRedundancyLostObject and now need to set up automation to recreate black and white photos from the source if the black and white photo is lost. We need to automate the process to keep the costs low and to ensure our cat owners are consistently able to show their cat pictures without any interruption to their service. In our example, the LOL cat you see below was uploaded to S3 in black and white, but AWS lost the object due to RRS. We are to create automation that recreates the object inside of S3.

Share our Labs
Start Your Free Trial

We have the longest and most in depth courses about cloud and engineering topics on the web. All of our training content is included with every membership.