AWS News Blog

Use Amazon SQS to Build Self-Healing Applications

Quite a few people ask us about best practices that they should consider when architecting solutions in the cloud. This post covers just one best practice: how to use Amazon Simple Queue Service to build self-healing applications. The basic idea is that you can create resilient and self-healing applications by implementing a Services Oriented Architecture that follows these three principles:

  1. Each component operates on its own
  2. Without relying on the component before or after it


  • Read from and write to a message queue at the boundary of each workflow stage in your application

  • If the component fails, restart automatically

  • Design for n + 1
  • Rather than repeat the details here, I just posted a short five-minute video on this subject on the Amazon Web Services Resource Center. Click here to view it in either Windows Media or Flash formats.

    Also, the following links are useful references for learning about how to use Amazon SQS and Amazon EC2 together:


    Get started with Amazon SQS and Amazon EC2

    Sample application to get started with Amazon SQS and Amazon EC2

    SQS-EC2 Job Processor Sample AMI

    — Mike

    Jeff Barr

    Jeff Barr

    Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.