I have two subnets in a VPC. One is public subnet and other is a private subnet. All EC2 instances in the public subnet and private subnet should access SQS, even if the internet is not reachable.
Is there a way like DNS filtering/SQS IP filtering on the outbound traffic so that the EC2 instances can access only AWS SQS service (like SQS) within VPC, without assigning public-IP to the instances?
(In short, I want to establish VPC endpoint like functionality for SQS, such that SQS is available within VPC but the internet is not necessarily reachable)
For example : "ping sqs.us-east-1.amazonaws.com" should work "ping google.com" should not work