I have an application and it reads messages from sqs when run locally but as soon as I deploy it's native image on EKS nothing happens and messages are queued on SQS. It looks as is my native image is not reading messages from SQS. No logs are printed and no exception.

Here is my code:

@Configuration
public class ReaderConfiguration {

    @Bean
    public SqsClient sqsClient() {
        try {       
            AwsBasicCredentials credentials = AwsBasicCredentials.create("access-key", "secret");
            return SqsClient.builder().region(Region.of("eu-central-1")).credentialsProvider(() -> credentials).build();
        } catch (Exception e) {
            e.printStackTrace();
            throw new AwsAuthenticationError("Aws Authentication Error");
        }
    }

}
@Component
public class SQSListner {

    private SqsClient sqsClient = null;

    @Autowired
    public SQSListner(SqsClient sqsClient) {
        this.sqsClient = sqsClient;
    }

    @SqsListener("notification")
    public void recieveMessage(Message msg) {
        System.out.println("Received Message" + msg.body());
        // processMsg();
    }

}
<dependency>
    <groupId>io.awspring.cloud</groupId>
    <artifactId>spring-cloud-aws-starter-sqs</artifactId>
</dependency>
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.0.0</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

image is build using mvn -Pnative spring-boot:build-image

Comment From: bclozel

Have you tried reporting this issue first to https://github.com/awspring/spring-cloud-aws with a minimal sample application?

If it turns out that this is a Spring Boot issue, please ensure to report it against a supported version as Spring Boot 3.0.x OSS support has ended.

Thanks

Comment From: pulsar-gupta

Thanks, I have raised there