Final answer:
To see the approximate number of messages in an SQS queue, use the GetQueueAttributes action with the ApproximateNumberOfMessages attribute.
Step-by-step explanation:
The action to use in order to see the approximate number of messages in an Amazon Simple Queue Service (SQS) queue is GetQueueAttributes with the ApproximateNumberOfMessages setting. This attribute returns the number of messages in the queue that are available to be received. Messages that are in flight (messages that have been received from the queue by a consumer but not yet deleted) are not included in this count. If you need to know the number of messages that are in flight, you can use the GetQueueAttributes action with the ApproximateNumberOfMessagesNotVisible attribute.