Giter Site home page Giter Site logo

aws-gateway-load-balancer-code-samples's Introduction

AWS Code Sample for AWS Gateway Load Balancer

Welcome

This is a respository for code examples to help accelerate your development of AWS Gateway Load Balancer (GWLB). The repository is organized by programming language or technology:

To learn more about Gateway Load Balancer, checkout the Gateway Load Balancer page and the documentation.

Note:

  • While code samples in this repository has been tested and believe it works well, as always, be sure to test it in your environment before using it in production!

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-gateway-load-balancer-code-samples's People

Contributors

amazon-auto avatar ddericco avatar f7o avatar kprepos avatar pmankad96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-gateway-load-balancer-code-samples's Issues

Current iptables implementation doesnt support GWLB Cross Zone Load Balancing

In the Appliance user data, you are currently only creating the iptables nat rules for the same AZ GWLB endpoint IP. If the user enables Cross Zone Load Balancing for the GWLB, the appliance will not route Geneve encapsulated traffic from the other GWLB AZ endpoints, thus resulting in intermittent connection timeouts.

To fix this, can I propose you iterate through the GWLB IPs and create the iptable nat rules per GWLB IP.
For example, Inside the appliance bootstrap user data:

Replace:
iptables -t nat -A PREROUTING -p udp -s $gwlb_ip -d $instance_ip -i eth0 -j DNAT --to-destination $gwlb_ip:6081;
iptables -t nat -A POSTROUTING -p udp --dport 6081 -s $gwlb_ip -d $gwlb_ip -o eth0 -j MASQUERADE;

With something like this:
for gwlb_ipaddress in $(aws --region $instance_region ec2 describe-network-interfaces --filters Name=vpc-id,Values=$instance_vpcid | jq ' .NetworkInterfaces[] | select(.InterfaceType=="gateway_load_balancer") |.PrivateIpAddress' -r)
do
iptables -t nat -A PREROUTING -p udp -s $gwlb_ipaddress -d $instance_ip -i eth0 -j DNAT --to-destination $gwlb_ipaddress:6081
iptables -t nat -A POSTROUTING -p udp --dport 6081 -s $gwlb_ipaddress -d $gwlb_ipaddress -o eth0 -j MASQUERADE
done

I'm going in after a launch and doing this manually to demonstrate the solution with Cross Zone Load Balancing enabled.

Spoke application

Application instance in spoke VPC fail running userdata script. have to run manually after launch

Centralized inspection architecture for Inbound traffic

Hello,
I have 2 questions about the Centralized inspection architecture :
1 - why you configure GLWBE on each VPC instead of using TGW to route traffic to the Inspection VPC ?
2 - how we can use the same archi for inboud traffic, from Internet to spoke VPC ? if I understand well the prinicpe of GWLB, it's not possible to do configure EIP on the the fw appliance and do Destination NAT, so how we can do NAT before accessing the GWLB ? I thought maybe I can use Network LB to handle the EIP and on the target specify the IP address of the private instance (on spoke VPC), but I'm not sure if we can do that ? any idea to have the same archi for outbound and inboud flow ?
Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.