AWS not receiving data

I have an arduino mega setup that streamed data to a third-party website I was using for testing but it is not streaming data to a new aws server I stood up recently.

Arduino has a communication sim800 module.
AWS has a spring-boot web server with security group inbound port, 80 and java server port at 5000.

The code below worked for the test purposes and the same code with my AWS URL did not work:

mySerial.println("AT");
      delay(1000);
    
      mySerial.println("AT+CPIN?");
      delay(1000);
    
      mySerial.println("AT+CREG?");
      delay(1000);
    
      mySerial.println("AT+CGATT?");
      delay(1000);
    
      mySerial.println("AT+CIPSHUT");
      delay(1000);
    
      mySerial.println("AT+CIPSTATUS");
      delay(2000);
    
      mySerial.println("AT+CIPMUX=0");
      delay(2000);
     
      ShowSerialData("CIPMUX");
     
      mySerial.println("AT+CSTT=\"TM\"");//start task and setting the APN,
      delay(1000);
     
      ShowSerialData("CSTT");
     
      mySerial.println("AT+CIICR");//bring up wireless connection
      delay(3000);
     
      ShowSerialData("CIICR");
     
      mySerial.println("AT+CIFSR");//get local IP adress
      delay(2000);
     
      ShowSerialData("CIFSR");
     
      mySerial.println("AT+CIPSPRT=0");
      delay(3000);
     
      ShowSerialData("CIPSPRT=0");
      mySerial.println("AT+CIPSTART=\"TCP\",\"THIRD_PARTY WEBSITE URL\",\"80\"");//start up the connection
      delay(6000);
     
      ShowSerialData("CIPSTART");
     
      mySerial.println("AT+CIPSEND");//begin send data to remote server
      delay(4000);
      ShowSerialData("CIPSEND");
      
      mySerial.println("GET [THIRD_PARTY WEBSITE URL]/create?field1=123&field2=456")begin send data to remote server
      delay(4000);

I also tried using HTTP call in my arduino code(where jsonObject is created using the standard arduino library Arduino_JSON) like below, but that did not work either:

mySerial.println("AT+HTTPINT");
      ShowSerialData("HTTPINT");
      delay(10000);
    
      mySerial.println("AT+HTTPPARA=\"CID\",1");
      ShowSerialData("CID");
      delay(1000);
    
      mySerial.println("AT+HTTPPARA=\"URL\",\"AWS_URL"");
      ShowSerialData("URL");
      delay(1000);
    
      mySerial.println("AT+HTTPPARA=\"CONTENT\",\"application/json\"");
      ShowSerialData("CONTENT");
      delay(1000);
      String str = "AT+HTTPDATA=";
    
      mySerial.println(str+jsonObject.length()+",10000");
      ShowSerialData("HTTPDATA");
      delay(10000);
    
      mySerial.println(jsonObject);
     
      ShowSerialData("JSON");
     
      mySerial.println("AT+HTTPACTION=1");//HTTP POST ACTION
     
      ShowSerialData("HTTPACTION");
     
      mySerial.println("AT+HTTPTERM");//terminate the http session
      delay(3000);
     
      ShowSerialData("HTTPTERM");

The possible issues, I think, could be around:

  • SIM connection or something to do with sim's IP address
  • SIM does not have a static public IP
  • AWS refusing certain connections
  • I have used curl to test that the endpoint actually works

I am at my wit's end here. Thank you for your help in advance!

AWS = Amazon Web Services?

LOL.

Yep, or any web server for that matter