2 Answers
- Newest
- Most votes
- Most comments
2
Hello.
I can't know the details without looking at the Lambda error message, but I thought that Lambda was probably unable to resolve the name of the SQS VPC endpoint and was failing to access it.
Try enabling private DNS on the SQS VPC endpoint as follows.
SQSVPCEndpoint:
Type: AWS::EC2::VPCEndpoint
Properties:
ServiceName: !Sub "com.amazonaws.${AWS::Region}.sqs"
VpcId: !Ref VPC
VpcEndpointType: Interface
SubnetIds:
- !Ref PrivateSubnetsAZ1
- !Ref PrivateSubnetsAZ2
SecurityGroupIds:
- !Ref LambdaSQSSecurityGroup
PrivateDnsEnabled: True
Also, try enabling private DNS settings for your VPC.
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
Tags:
- Key: Name
Value: "LambdaAuroraVPC"
EnableDnsHostnames: True
EnableDnsSupport: True
0
You do not have any OUTBOUND (Egress) rules on your LambdaSQSSecurityGroup. This is preventing lambda from connecting outbound to RDS and SQS
You also do not need rds-data:* if your connecting natively to PostGres on 5432. rds-data:* is only needed if your using the https APi to pull data.
Egress is by default all trafic to 0.0.0.0/0, rds I need because I use aurora. I removed aurora from template to make it smaller.
Relevant content
asked 8 years ago
- AWS OFFICIALUpdated 3 months ago

yes this work, does it affect somehow the total price?
No, the setting to enable private DNS does not affect pricing.