0

I'm trying to connect to AWS SQS from a spring-boot project and the application fails to start with the below error

Invocation of init method failed; nested exception is com.amazonaws.services.sqs.model.AmazonSQSException: The address https://sqs.us-east-1.amazonaws.com/ is not valid for this endpoint. (Service: AmazonSQS; Status Code: 404; Error Code: InvalidAddress; Request ID: <uuid>; Proxy: proxy-qa.domain.com)

This is my SQS config

@Slf4j
@Configuration
@EnableSqs
public class AmazonSQSConfiguration {

    @Value("${aws.region}")
    private String region;

    @Bean
    @Primary
    public AmazonSQSAsync amazonSQSAsync() {
        return AmazonSQSAsyncClientBuilder
                .standard()
                .withCredentials(new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()))
                .withRegion(region)
                .build();
    }
}

Any idea how to resolve this issue?

Isuru Pathirana
  • 1,060
  • 1
  • 16
  • 37

0 Answers0