Make Interactive Brokers TWS API calls from AWS Lambda

0

I have a lambda function packaged with the ibapi lib. IB Gateway (which provides connection to the API client) is connected via a local machine. What I need is for the lambda function to send the call to a specified port of my local machine and for the IP address the lambda function is registered to be added to the approved list in IBGW.

Currently, my function runs and times out following a test event.

asked a year ago495 views
1 Answer
0
Accepted Answer

Lambda functions by default run in the Lambda service VPC and as such do not have an IP that you can use. If you need al your requests from Lambda to come from a specific IP, you must attach the function to a VPC and use a NAT Gateway with an EIP in that VPC to route the traffic to the internet. If you need it to access a local resource in the VPC, you can use the IP address allocated to the ENIs that are attached to the VPC for the Lambda usage.

profile pictureAWS
EXPERT
Uri
answered a year ago
  • Thank you. I would need the requests from the Lambda function to come from a specific IP. Would you be able to point me to instructions on how to set this up please?

  • You can find detailed instructions here.

  • thank you mate

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions