In this post I will describe how to go about implementing a very simple application using AWS SQS.
Getting started
Generally developers (including myself) guilty of simply commencing development with very little information. As our queue is going to reside in the cloud, we really should take a step back and think carefully. One of the key aspects we need to clearly understand is access permissions. We do not want our queue to be accessible to everyone under the sun.
The service that is most talked about in any AWS conference or web cast is the Amazon Identity and Access Management (IAM) service. As the name implies, this service is used to create users/identities and assign permissions.
The producer of the application sends messages to the queue. Therefore we only require send permission to the queue. At the same time, consumer reads messages from the queue. We can create two users and assign the the minimum permissions.
Before we do create the users, we should ideally create the queue. In AWS a service is known as a "resource". So a queue is a resource. The access permissions can then be applied for the new queue resource.
If you do not have an AWS account, it is time to create one. There is now a free tier allowing a good deal of access to most of the services. Login to AWS console at http://aws.amazon.com.
The username and password you used to login to AWS Console is known as the "root" credentials.
Create the queue
In the AWS console, navigate to "Services" => "All Services" and you should see "SQS" as a selection.AWS SQS Service under All Services |
Queues table with the newly created queue |
If you now select the queue, AWS shows a whole collection of meta data about the queue. This is the most interesting bit.
Queue details |
The URL is the public endpoint of the queue. The ARN refer to the Amazon Resource Name, which is the fully qualified queue name, that includes the region, account details and the queue name. Keep a note of the ARN as we will use this when setting permissions for the users.
The next step is to create couple of users with the just enough permissions to send/receive messages.
ReplyDeleteIt is really a great work and the way in which you are sharing the knowledge is excellent.Amazon Web service Training in Velachery
Nice blog! Keep update and share AWS Online Course
ReplyDelete