Can not access SQS via VPC SQS endpoint

0

Hi,
I am struggling with connecting to SQS via endpoint in VPC.

I can read messages from SQS from my EC2 instance that is connected to internet. Now I would like to access SQS without round trip to internet using SQS VPC endpoint.

When I create an VPC endpoint for SQS service, assign it to the same VPC and subnet my ec2 instance is in, I can no longer read SQS messages from that instance. I have also enabled Private DNS name when creating endpoint.

Request for reading a message gets timeout error:
Connect timeout on endpoint URL: "https://eu-central-1.queue.amazonaws.com/"

Any hints what might be wrong?

Edited by: rslak on Mar 7, 2019 5:02 AM

rslak
질문됨 5년 전4091회 조회
3개 답변
1

I have identified the problem.
It was security group. I have to to set up separate group where all traffic destination/source has range of internal subnet and not just everything.

rslak
답변함 5년 전
  • Nailed it for me! Great!

  • Could you explain in a little more detail what you mean by this? Thanks.

0

Hi rslak,

Looks like you are using the legacy endpoint format and it is not supported in SQS VPC endpoint. Give https://sqs.eu-central-1.amazonaws.com a try. (detailed endpoint information per region can be found here: https://docs.aws.amazon.com/general/latest/gr/rande.html#sqs_region)

It is also possible that you have restricted traffic and access in the security group assigned to your VPC endpoint. I would recommend you to follow our tutorial: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-sending-messages-from-vpc.html, setup a functional example, and then compare and constrast the differences.

Hope this helps,
Jackie

AWS
답변함 5년 전
0

Thanks for suggestions.
I have tried with provided endpoint but without luck. I still get the same error, although I have changed the endpoint name:

$ aws sqs receive-message --queue-url "https://sqs.eu-central-1.amazonaws.com/<my_queue_name>" --max-number-of-messages 1
Connect timeout on endpoint URL: "https://eu-central-1.queue.amazonaws.com/"

I am using default VPC security group with everything open.

I will try with CloudFormation example.

rslak
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인