title: How to read sqs message using lambda python in aws?
body: <p>I have tried to read message from sqs queue using boto client in lambda python.
  But i face issue with <code>&quot;&quot;errorMessage&quot;: &quot;'sqs.ServiceResource' object has no attribute 'receive_message'&quot;,&quot; . couldnt find the root cause</code>. Anyone help on this</p>
  <p>My code in lambda</p>
  <pre><code>import json
  import boto3
  client = boto3.resource('sqs','us-west-2')
  queue_url='https://sqs.us-west-2.amazonaws.com/050190852521/MyQueue'
  def lambda_handler(event, context):
          
          response = client.receive_message(
              QueueUrl=queue_url,
              AttributeNames=['SentTimestamp'],
              MaxNumberOfMessages=1,
              MessageAttributeNames=['All'],
              VisibilityTimeout=0,
              WaitTimeSeconds=0
          )
          print('entered')
          print('Received %s' % message)
  
          message = response['Messages'][0]
          
          return {
              'statusCode': 200,
              'body': json.dumps('Hello from Lambda!')
          }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/p50jt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p50jt.png" alt="enter image description here" /></a></p>