23 votes

2 ELBs (ALBs) to 1 target group, possible?

I'm not sure if you can point two ALBs to a single TargetGroup. However since you mentioned AutoScaling you can have the ASG instances automatically registered in more than one TargetGroups, therefore ...
MLu's user avatar
  • 25.5k
23 votes
Accepted

AWS recommends 54 t2.nano EC2 instances instead of one m5.xlarge

There's a couple of things to understand: Reserved Instances are just a billing construct. AWS will try to match the purchased reserved instances against your running instances at the billing time. I....
MLu's user avatar
  • 25.5k
19 votes
Accepted

Possible to log X-FORWARDED-FOR to nginx error_log?

You should be using the real IP module, so that the client's actual IP address is considered the remote IP address, rather than your load balancer's IP address. This way, you won't have to check X-...
Michael Hampton's user avatar
16 votes
Accepted

AWS Fargate + Application Load Balancer SSL Termination

Yes it is possible. Create a SSL certificate for your domain in ACM (Amazon Certificate Manager). Create a HTTPS Listener in the ALB that will listen on port 443 and configure it to use the above ...
MLu's user avatar
  • 25.5k
15 votes

How to redirect HTTP to HTTPS on AWS Application Load Balancer?

As of July 2018, this is supported on application load balancers. Add/Edit your HTTP:80 listener Set the action to Redirect protocol: https port: 443 set the next dropdown to Original host, path, ...
John Pope's user avatar
  • 151
10 votes

Is there a limit on the length of URLs when using Amazon ELBs? If so, is there a way to increase it?

We received the following answer from AWS Support (formatting mine): Kindly note that there is a limit for the URI length for all load balancers and as you are getting the 414 error, your GET request ...
rhopman's user avatar
  • 201
10 votes

how to forward godaddy domain to ec2 load balancer

In addition to the accepted answer, another option is to create an AWS hosted zone in AWS Route 53 following the steps below: Sign in to the AWS Management Console and open the Amazon Route 53 ...
kakoma's user avatar
  • 201
9 votes

Redirect all http requests behind Amazon ELB to https without using if

This solution uses conditional logic, but as the accepted answer suggests, I also think this is ok. Ref: https://stackoverflow.com/questions/4833238/nginx-conf-redirect-multiple-conditions Also, ...
Jonny Mac's user avatar
9 votes

Amazon CloudFormation: How to get an ELB's private IP for a specific subnet?

If you want to get the private ip address of an elb, check network interfaces under network and security in you ec2 dashboard.
JasdeepSingh's user avatar
8 votes

Load Balancer on Amazon does not have secure flag set for Cookie

I just re-checked the AWS documentation and it's still the case - you can't make this cookie secure or httpOnly. http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-sticky-...
Matthew Wanders's user avatar
8 votes

Is it possible to show a static page if all ELB registered instances are down?

You have a couple options I can think of: Put AWS's Cloudfront CDN in front of your ELB, and customize the error response for 503 errors. Details on how to do that are in the AWS docs and it can be ...
ceejayoz's user avatar
  • 33.2k
8 votes
Accepted

What is the difference between http_cookie and cookie_name in Nginx?

The variable $http_ is about the http header. So if you have $http_host, it's grabbing the host from the header. If you say $http_cookie, you're getting the entire cookie. The variable $cookie_ is ...
Grumpy's user avatar
  • 3,009
7 votes

Amazon CloudFormation: How to get an ELB's private IP for a specific subnet?

JQ parsing version, just FYI. aws ec2 describe-network-interfaces --filters "Name=description,Values=ELB your-elb-name" --output json | jq ".NetworkInterfaces[].PrivateIpAddresses[].PrivateIpAddress"
BlackPioter's user avatar
7 votes
Accepted

AWS Cloudfront + Load Balancer, url changes from main domain to load balancer subdomain

This behavior likely results from the fact that by default CloudFront sets the Host: HTTP request header to the origin hostname, in this case elb.example.com. The application then presumably generates ...
Mohamed Heiba's user avatar
7 votes
Accepted

AWS ELB endpoint in Godaddy

You want to use a CNAME record, something like my.web.thingy.org CNAME my-loadbalancer-1234567890.us-west-2.elb.amazonaws.com. http://docs.aws.amazon.com/ElasticLoadBalancing/latest/...
user4556274's user avatar
7 votes
Accepted

Is it okay to use an Elastic Load Balancer for ssh/sftp traffic?

An ELB is the wrong way to do this. Your question isn't as clear as it could be, but I'll answer as best I can. I think you need a private subnet with a DMZ. I suspect you may be best off with a t2....
Tim's user avatar
  • 32.8k
7 votes
Accepted

Force HTTPS on AWS ELB

I have finally figured it out. I had to put my configuration in \.ebextensions\nginx\conf.d\elasticbeanstalk\*.conf, for instance \.ebextensions\nginx\conf.d\elasticbeanstalk\force-https.conf. ...
lexicore's user avatar
  • 221
7 votes

AWS recommends 54 t2.nano EC2 instances instead of one m5.xlarge

The general idea behind this is instead of provisioning one large server for peak load, you have a larger number of smaller servers that scale up and down automatically to meet load. You put your ...
Tim's user avatar
  • 32.8k
6 votes

How to set up ELB health checks with multiple applications running on each EC2 instance?

On 11 August 2016, Amazon introduced Application Load Balancers. These let you specify multiple Target Groups, each with its own type of health check. So this is now possible using a single load ...
Thomas's user avatar
  • 811
6 votes
Accepted

Security of SSL certs on AWS ELBs / SSL offloading

Where does that certificate ultimately persist if I put it on the ELB? The certificates are stored in IAM. They should be as secure, there, as your account credentials are, so this seems like a ...
Michael - sqlbot's user avatar
6 votes
Accepted

Full end to end encryption with AWS Elastic Load Balancer, Nginx and SSL

Does having and unencrypted connection between the load balancer and nginx pose a security risk? If talking about credit card data and stuff like this: Yes. If the answer to 1 is yes, how would I ...
gxx's user avatar
  • 5,651
6 votes
Accepted

Apache DirectorySlash redirects HTTPS requests back to HTTP

Since rewrite will kick in before DirectorySlash, here is what ended up with and it works: # Redirect to HTTPS before Apache mod_dir DirectorySlash redirect to HTTP RewriteCond %{HTTP:X-Forwarded-...
starchx's user avatar
  • 533
6 votes
Accepted

How to prevent nginx redirecting from HTTPS to HTTP on AWS?

The best place to fix the problem is where the SSL connection is terminated. If it was running nginx, you would use a proxy_redirect statement to map http to https in the Location header. I don't know ...
Richard Smith's user avatar
6 votes

Apache redirects from HTTPS to HTTP when adding trailing slash to directory

In httpd.conf, change ServerName from localhost to ServerName https://localhost Adding https:// at beginning of this parameter solved me the exact same problem.
Roey's user avatar
  • 161
6 votes

Does TCP Passthrough mode give better latency performance than HTTP listeners

Your understanding isn't quite correct, because TCP pass-through is really payload pass-through. The balancer accepts the connection, then creates a new connection to the instance, then passes the ...
Michael - sqlbot's user avatar
6 votes
Accepted

ALB Connection Draining is always reaching the "Deregistration Delay"

The documentation has meanwhile been updated: If a deregistering target has no in-flight requests and no active connections, Elastic Load Balancing immediately completes the deregistration process, ...
Steven's user avatar
  • 176
6 votes
Accepted

Multiple certs on an ELB listener. Nagios monitoring only checks the default one, regardless of host name

Use check_http --sni When multiple certificates are used on the same ip:port the client must use Server Name Identification (SNI) to select the right one. Modern browsers do it by default, however ...
MLu's user avatar
  • 25.5k
5 votes

How to block Nginx access log statements from specific user agents

Thanks to @gnarfoz Respect to if is Evil, This is better way to use condition before log map $http_user_agent $ignore_ua { default 1; "~Pingdom.*" 0; } ...
a55's user avatar
  • 151
5 votes

Nginx set_real_ip_from AWS ELB load balancer address

The realip_module states that in case of X-Forwarded-For, this module uses the last ip address in the X-Forwarded-For header for replacement. This module will not work when only real_ip_header and ...
Harish Chennamsetty's user avatar
5 votes

Using Amazon Load Balancers to route traffic to private servers outside Amazon

As of August 31, 2017, the Application Load Balancers support IP addresses as targets in addition to instance IDs: We are pleased to announce that Application Load Balancers can now distribute ...
mrg2k8's user avatar
  • 91

Only top scored, non community-wiki answers of a minimum length are eligible