Search code examples
amazon-web-servicesaws-lambdaamazon-vpcaws-event-bridge

AWS Lambda in VPC not able to send to Event Bridge


In AWS I have an account with VPC set up, and I cannot send an event from the lambda to the Event Bus. How can I send to the event bus? Please look at the picture below to understand our setup better. We also have VPC peering with another account set up.

enter image description here


Solution

  • The EventBridge service exists outside your VPC. Lambda functions inside a VPC never get a public IP address assigned to them, so they can't directly access anything that exists outside the VPC.

    To give your Lambda functions access to EventBridge you either need to deploy the Lambda function to only VPC subnets that have a route to a NAT Gateway (which will also give them access to the Internet), or add an interface VPC endpoint for EventBridge to your VPC.