I have a Lambda function that consumes messages from an AWS SQS queue and when message processing fails then Lambda is supposed to send the message back to same queue with some delay.
Problem is, the attempt to send message to SQS in case of processing failure leads to this error:
TimeoutError: Socket timed out without establishing a connection
I was able to fix this error by adding following Inbound rule to the security group that is linked to the Lambda function.
I have 2 questions:
- Is it secure to add this rule ?
- Why do I need to add this inbound rule? Is there a way using which I can fix the timeout error without the need to add this rule? If not, then can I limit the range of allowed addresses ?