-1

I have a private subnet in my VPC on AWS. I have a java application uploaded on Lambda in that subnet, from which I am trying to connect to SQS via interface endpoint. In my java application I connect to SQS by :

AmazonSQS sqsClient = AmazonSQSAsyncClientBuilder
                .standard()
                .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(ENDPOINT_URL_SQS, REGION))
                .withCredentials(new EnvironmentVariableCredentialsProvider())
                .build();
sqsClient.sendMessage(new SendMessageRequest(SQS_URL, objectMapper.writeValueAsString(sqsMessageObject)));

but I get Unable to execute HTTP request: Connect to sqs.eu-central-1.amazonaws.com:443 failed: connect timed out in Lambda logs.

I gave access on 22 port for tcp traffic in my security groups. Is there anything i am missing? Thank you in advance.

Nane Petrosyan
  • 553
  • 1
  • 7
  • 19

1 Answers1

0

I was using queue URL in the code. I changed it to endpoint URL and it worked.

Nane Petrosyan
  • 553
  • 1
  • 7
  • 19