title: Error while connecting to AWS SQS from spring boot
body: <p>I am trying to integrate AWS SQS into my springboot app using spring   cloud AWS, but keep getting this error(posted below), can someone help?</p>
  
  <p>Here are my files.</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'simpleMessageListenerContainer' defined in
    class path resource
    [org/springframework/cloud/aws/messaging/config/annotation/SqsConfiguration.class]:
    Invocation of init method failed; nested exception is
    java.lang.NoSuchMethodError:
    com.amazonaws.http.ExecutionContext.setCredentials(Lcom/amazonaws/auth/AWSCredentials;)V</p>
  </blockquote>
  
  <pre><code>@Configuration
  public class AWSConfig {
      @Value("${amazon.dynamodb.endpoint}")
      private String amazonDynamoDBEndpoint;
  
      @Value("${amazon.aws.accesskey}")
      private String amazonAWSAccessKey;
  
      @Value("${amazon.aws.secretkey}")
      private String amazonAWSSecretKey;
  
      @Value("${amazon.sqs.endpoint}")
      private String amazonSqsEndpoint;
      @Bean
      @Primary
      public AmazonSQSAsyncClient amazonSQSAsyncClient() {
  
          AmazonSQSAsyncClient amazonSQSAsyncClient = new AmazonSQSAsyncClient(amazonAWSCredentials());
          if (!StringUtils.isEmpty(amazonSqsEndpoint)) {
              amazonSQSAsyncClient.setEndpoint(amazonSqsEndpoint);
          }
  
          return amazonSQSAsyncClient;
  
      }
  
      @Bean
      public AWSCredentials amazonAWSCredentials() {
          return new BasicAWSCredentials(amazonAWSAccessKey, amazonAWSSecretKey);
      }
  }
  </code></pre>
  
  <p>I am able to work with dynamodb with this but not able to connect to SQS.
  I have given the correct access key, secret access key and end point in application.properties file.</p>
  
  <pre><code>@Component
      @EnableSqs
      public class SQSDao {
          private static final Logger logger = LoggerFactory.getLogger(SQSDao.class);
  
          private  QueueMessagingTemplate queueMessagingTemplate;
  
          @Autowired
          public SQSDao(AmazonSQSAsync amazonSqs) {
              this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs);
          }
  
          public void send(String message) {
              System.out.println(queueMessagingTemplate.getDefaultDestination());
              queueMessagingTemplate.convertAndSend("test-queue",  MessageBuilder.withPayload(message).build());
          }
  
          @SqsListener(value = "test-queue", deletionPolicy = SqsMessageDeletionPolicy.NEVER)
          public void receive(String message)
          {
              System.out.println("message: " + message);
          }
  
      }
  </code></pre>