I have an SMTP server running (I have its ip address) but when I try to register it as a target to NLB I get the following error:
An error occurred (ValidationError) when calling the RegisterTargets operation: The Availability Zone is required for IP address 'X.X.X.X' because it is not in the VPC.
The SMTP is not running on AWS so I do not have its AZ, but I know its IP and hostname. I am using target-type as "ip" for the NLB.
Thank you in advance.
using target-type as "ip" for the NLB
It must be private IP address, not public. So you either have to setup a VPN between AWS and your SMTP server, or migrate your SMTP to AWS.