Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Les Hartzman


    I am trying to use an Aurora MySQL cluster of 1 writer and 1 read replica.

    I set up my properties as follows:


    But when I look at processlist for the writer and read-replica hosts, only the writer has had any activity. Do I need additional configuration set up? This is a Spring Boot app integrated with Spring Cloud for AWS.


    (The db instance name matches the master name)

    Maciej Walkowiak
    @mehmetranas digital ocean most likely can be cheaper than AWS, but AWS does a lot for you so you have to worry about less things. I would recommend to go with Beanstalk. We can chat privately if you need more guidance.
    @FelipeAdorno regarding SQS polling, consider increasing wait time on SimpleMessageListernerContainer. There is an issue related to it spring-cloud/spring-cloud-aws#319
    Sanjay Rawat
    Hey @maciejwalkowiak just saw your tweet about PR on spring-cloud-aws, if you've time then please look into the RDS Support.
    It wasn't working for any other database other than Mysql
    So I ignored the RDS support and used the url, password directly in th app
    Maciej Walkowiak
    Hi @RawSanj! First I want to tackle SQS and messaging in general and then look at RDS and caching support. But I am just a regular contributor, I have no rights to actually push anything to master branch.
    Have you considered digging into the issue and submiting PR with fix?
    Sanjay Rawat
    I wanted to but got super busy with the project work in office.
    Maciej Walkowiak
    Sure, understood. I used RDS just using classic Spring Boot + Spring Data integration. But no transparent replica support then.
    Sanjay Rawat
    Oh ok. I ended up doing the same and it is working fine for now.
    Maciej Walkowiak
    Can you file an issue on Github regarding running with other databases? (if it’s not there yet). Including your setup and exception you’re getting. Would be helpful for investigation.
    Sanjay Rawat
    I think there's already one but if not I'll create it as soon as I get time
    @maciejwalkowiak thanks for answer
    ashish gupta k
    hello, Spring cloud Sleuth and Zipkin packages do not support SQS Senders, only RabbitMq and Kafka streams. I am planning to add https://github.com/openzipkin/zipkin-aws/tree/master/sender-sqs to spring-cloud-sleuth-zipkin-1.3.3.RELEASE.jar and include in my gradle package. Do you recommend this approach? Or is there a library which already does it?
    Quantum Fusion
    Are there any tech recruiters in here?
    Quantum Fusion
    Is anyone using Athena on AWS for serverless database with AWS Lambda serverless?
    Gaurav Rawat
    Hi have there been any changes to the sqs functionality from Finchley.M9 to Finchley.RELEASE . AS post upgrade we have started getting connection timeout errors while polling SQS . Are the changes somehow overriding our default AWS clientconfigurations ?
    Jorge Luiz Reis Tavares
    Hi folks, I had a problem with spring cloud aws auto configuration, the project was not recognize the aws region (setted on application.yml) and throw a "com.amazonaws.SdkClientException:Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region." when I try to configure a AWSSimpleSystemsManagement client, some one can help me? I have an example in my github for exemplify my problem, follow https://github.com/omundodebob/springcloud-aws-config-poc. Note: The accessKey and secretKey is a fake, just to test this problem :).
    rajat katyal
    @here I want to use Spring cloud config with AWS EC2(Application). Could somebody recommend whether it will be wise to use that or maintaining the configurations in the applications is better?
    Currently we have the configurations in the DB and want to migrate this to the cloud config.
    Or there are any better approach for the single Application with configurations of multiple regions?
    Hi all
    @here Hi all, I am trying to look into this enhancement (spring-cloud/spring-cloud-aws#372) but not sure how to setup the project locally so that I can implement and test this. Can anyone help me?
    @rajatkatyal1986_twitter Hi... From my experience having the configuration in your application make the code-base more portable. In our projects we are using https://github.com/zalando/spring-cloud-config-aws-kms extension to secure the properties. It's a great extension and works well. But can't comment on the config server. Haven't used it. But configuration over multiple regions can be achieved using custom @Beans declarations and custom property loaded for those said beans via property file.\
    @lhartzman_gitlab Well if you need to talk to master then end point should be master endpoint (AWS endpoint url).. If it's the read replica you need to use use the AWS provided endpoint. AWS provided endpoint will have the fail-over handled by AWS. You don't have to worry. But depends on the use case which url to use.
    José Antonio Jiménez
    Umm, i have one question related to the integration with AWS SNS. We recently have been surprised to find out that in order to use this integration you need to have list-topics permissions in SNS. Why spring-cloud-aws works this way? I mean using list-topics and getting the topic-arn for publishing a message.
    @logistark Not sure you fully explain the question here or I understand it fully.. Well having to get permission to list topics is not related to Spring cloud. It's something enforced from the AWS side.
    For example in one of our project we do setup queues but for that we first query for queue by name and then get the ARN for the queue via an API call. Then using ARN we communicate with the queue. hard-coded ARN in the code (can be in configuration) make it difficult to change over time. In my case I feel it makes the code-base less portable. Not sure this answer the question if not please do let know.
    José Antonio Jiménez
    Yeah, it was my mistake. We have another library in Clojure that publish to sns, and i had the wrong idea that for publishing in SNS you only need the name of the topic. And just checked it, and is as you describe. Sorry.
    Yasin Kothia
    Is anyone using spring-sleuth with spring-cloud-aws? does it work out of the box? I wanted to send traceIds when sending messages via SQS.
    Edward Brighton
    hi all,i need to configure multiple SimpleMessageListenerContainerFactory.how can i set it for per SqsListener? thnks
    2 replies
    Hi all
    Hello all,

    I'm trying use the spring-cloud-aws-jdbc in my project, but when I receive a large number of user I have a problem, It seems like my pool of connections is full.

    Exception: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:100; busy:100; idle:0; lastwait:30000]

    I have used C3P0 in it with no problem. Is possible I use C3P0 for pool connection instead Tomcat pool?

    2 replies
    Mateusz Mrozewski
    Hi. Is mvn package reformatting sources of spring-cloud-aws for you as well? Do I need to do any additional setup not to have such behavior?
    Hi, does anybody know how to use multiple AWS keys in a single Spring Cloud AWS project?
    HI, I am trying to integrate spring cloud with aws secrets manager. I attached an instance profile to my EC2 which allows reading parameters from Secrets manager. I am getting connection timeout error. It is trying to connect to cloudformation.us-east-1.amazonaws.com. I guess the call is routing to internet and firewall is blocking it. I sthere way i can configure my spring boot project to use cloudformation endpointso that it won't go to public internet? I am following this..https://cloud.spring.io/spring-cloud-static/spring-cloud-aws/2.1.0.RELEASE/single/spring-cloud-aws.html#_integrating_your_spring_cloud_application_with_the_aws_secrets_manager
    How to connect to aurora db rds ?
    Robert Wiesner

    Hey guys ... question to spring-cloud-aws / multiple listeners on one queue

     class A{
      @SqsListener(value = "some-queue", deletionPolicy = ON_SUCCESS)
      public void onMessageReceived1(String payload, @Header(TYPE) String messageType) {}
     class B {
      @SqsListener(value = "some-queue", deletionPolicy = ON_SUCCESS)
      public void onMessageReceived2(@Payload SomeMessagePayload message, @Header(TYPE) String messageType) {}

    would that work? btw. is the Method Name taken into account?

    I got "Ambiguous handler methods mapped for destination " when both methods are called "onMessageReceived"

    2 replies
    Kris Krishna
    Anybody used AWS MSK with spring-cloud-aws

    Hi all, When i am using @SqsListener with Object its not getting the value

        public void processMessage(Person person) {
            System.out.println("Message Received - " + person.getName());

    I get the value - Message Received - null

    When i debug i can see the GenericMessage payload with actual value. I thought If jackson library is in class path message converstion happens automatically

    I have configured QueueMessageHandlerFactory with StrictContentTypeMatch- false

        public QueueMessageHandlerFactory queueMessageHandlerFactory() {
            QueueMessageHandlerFactory factory = new QueueMessageHandlerFactory();
            MappingJackson2MessageConverter messageConverter = new MappingJackson2MessageConverter();
            //set strict content type match to false
            factory.setArgumentResolvers(Collections.singletonList(new PayloadMethodArgumentResolver(messageConverter)));
            return factory;
    Getting this error
    org.springframework.messaging.converter.MessageConversionException: Cannot convert from [java.lang.String] to [com.nbenjam.springcloudawsmessaging.domain.Person] for GenericMessage [payload={
    "Type" : "Notification",
    "MessageId" : "6f18d976-c801-58a8-be7a-8fdc47069ac8",
    "TopicArn" : "arn:aws:sns:us-east-1:88s8s8s:demo-topic",
    "Message" : "{\"name\":\"Ryan-Adam\",\"age\":10}",
    "Timestamp" : "2020-01-28T19:34:31.951Z",
    "SignatureVersion" : "1",
    Taylor Bruce
    Hello All, I want to be able to extend message visibility in SQS. How can I do this using Spring Framework? Currently I have it working well and deserializing my body payload to an object however I want to be able to get the ReceiptHandle for the message in order to extend the message visibility as my application does work.
    Fernando Montes

    I've upgraded from spring-boot from 2.2.2.RELEASE to 2.2.4.RELEASE. and this seems to change the behavior of the sent metrics to aws (I'm getting lot's of The parameter MetricData.member.7.Dimensions.member.5.Value is required.) I'm using io.micrometer:micrometer-registry-cloudwatch:1.3.2 (I've also tried 1.3.3), on a separate note I've just noticed that io.micrometer:micrometer-registry-cloudwatch is now deprecated and that there is a io.micrometer:micrometer-registry-cloudwatch2 (I've tried this one but it fails to be picked up by spring)

    so the questions are:

    • how can I debug which metric is causing problems? any logs I can enable?
    • seems like io.micrometer:micrometer-registry-cloudwatch2 is they way to go now is it compatible with spring-cloud-aws?
    • have you encountered something similar? and how did you fix it

    thanks in advance

    @nbenjamin I've seen that problem, in a nutshell you seem to be expecting a raw message, but you are getting a wrapped message, try to change your mapping from:

    foo(Person person){} to foo (@NotificationMessage Person person) I'm assuming this is the listener (your queue on aws should not send the raw message)

    Taylor Bruce
    Also I believe I am having a memory leak in the spring cloud aws library - Ive removed all business logic from my application and simply have a SQSListener that spits out the message to stdout. After running through about 30k messages across 10 k8s pods the memory starts to run away. Any pointers?
    Do I need spring cloud to use spring cloud aws?
    1 reply
    Harish Chava
    Hello There, Is there a way to monitor any new objects creation events on Aws S3 bucket using Spring?
    If so, Please provide the best practices. Fyi, I've only read access for a 3rd party S3 bucket using aws access and secret keys.