skip to Main Content

I am having a spring boot app and it’s deployed over the AWS EKS cluster. There is one maven dependency ‘aws-java-sdk’ . Earlier it was running fine with the older version – 1.11.52, but when I have updated the version to – 1.12.470. It start giving me 504 Gateway Time-out error.

 <dependency>
   <groupId>com.amazonaws</groupId>
   <artifactId>aws-java-sdk</artifactId>
   <version>1.12.470</version>
 </dependency>

Also check with cloudwatch related to HTTP Errors, no errors are coming.

2

Answers


  1. Chosen as BEST ANSWER

    I was able to solve it by adding only the dependency I need-

      <dependency>
         <groupId>com.amazonaws</groupId>
         <artifactId>aws-java-sdk-sts</artifactId>
         <version>1.12.472</version>
      </dependency>
      <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-rds</artifactId>
        <version>1.12.472</version>
      </dependency>
      <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-cognitoidp</artifactId>
        <version>1.12.472</version>
      </dependency>
    

    The problem with aws-sdk-java is that it download the complete jars package which are the part of aws sdk ecosystem and the others jars may conflict with the EKS causing the issues. One more thing that all the aws-sdk jars version should be exact same, since internally they have dependency on other aws jars as well which also might create problems.

    It was advisable to use the relevant jars that you needed, not the complete package.


  2. Usually security/firewall related issue somewhere…

    https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-504-gateway-timeout.html

    An HTTP 504 status code (Gateway Timeout) indicates that when
    CloudFront forwarded a request to the origin (because the requested
    object wasn’t in the edge cache), one of the following happened:

    The origin returned an HTTP 504 status code to CloudFront.

    The origin didn’t respond before the request expired.

    CloudFront will return an HTTP 504 status code if traffic is blocked
    to the origin by a firewall or security group, or if the origin isn’t
    accessible on the internet. Check for those issues first. Then, if
    access isn’t the problem, explore application delays and server
    timeouts to help you identify and fix the issues.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search