Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render_list function does not handle external IPs due to boto3 api error #6

Open
andysnowden opened this issue Nov 19, 2022 · 0 comments

Comments

@andysnowden
Copy link

If you are trying to use the lamda with non-vpc IP address the AWS api/boto3 will fail with the following error

[ERROR]	2022-11-19T18:50:05.007Z	75a3e5b4-4302-4493-9824-539647241114	The Availability Zone is required for IP address '172.25.18.11' because it is not in the VPC

To resolve you need to specify the AZ in the render_list function. This should prob be added as an option param in the formation template

def render_list(ip_list):
    """
    Render a list of targets for registration/deregistration
    """
    target_list = []
    for ip in ip_list:
        target = {
            'Id': ip,
            'AvailabilityZone': 'all'
        }
        target_list.append(target)
    return target_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant