I find it best to add a CloudFront Distribution, with "Redirect HTTP to HTTPS" set. CloudFront terminates the TLS session with your cert, then talks to your Elastic Beanstalk's ELB using http, though public internet users are automatically redirected to the HTTPS endpoint.
This can be achieved following these steps:
- Go to CloudFront > Create Distribution > Web
- Select the ELB Origin
- Select Viewer Policy: Redirect HTTP to HTTPS
- Select Cache Based on Headers: All (this allows caching per user, though you may want to refine this later)
- Object Caching : Customize (disables default caching, review later to optimize)
- Enter Minimum, Maximum and Default TTL as 0
- Cookies and QueryString to All
- Select appropriate Price Class, less regions are cheaper.
- Alternative Domain Names: add all domain names that you want to be directed at this Distribution
- Custom SSL Certificate (this needs to be a certificate in us-east-1 with all the domain names entered above as alternative names.
- Once the Distribution has been created, you need to update your DNS CNAME to point to the ___.cloudfront.net address that you are given.