An SQS message goes through the following steps in its lifecycle, from creation to deletion. It is assumed that a queue has already been created.
A message is created and sent to the queue using an action on the MessageQueue endpoint. The MessageQueue endpoint is represented by the queue URL returned from the CreateQueue or POST action that created the queue. The SendMessage action is used in Query and SOAP requests. The PUT action is used in REST requests.
When the consuming component is ready to process the message, it is retrieved from the queue by using an action on the MessageQueue endpoint, which is a queue URL returned from the action used to create the queue. The ReceiveMessage action is used in Query and SOAP requests. The GET action is used in REST requests.
While the receiver processes a message, it remains in the queue. However, it remains hidden and is not returned to subsequent ReceiveMessage or GET requests until the duration of the visibility timeout has expired.
The message is deleted from the queue. Messages remain in the queue until deleted. This is done using the DeleteMessage action in Query and SOAP requests. The DELETE action is used in REST requests. If the message is not deleted from the queue it will be returned by a ReceiveMessage request that occurs after the visibility timeout has expired, causing the message to be received more than once.