- Newest
- Most votes
- Most comments
I had a chat about this with AWS Support recently.
At the time of writing this, it was not supported, but they had a feature request for it, with unknown ETA.
A workaround they suggested was to use CloudFront in front of ALB and rewrite the cookies. I have not tried it myself, but if you're desperate, might be worth a try.
Maybe API Gateway could also be used to rewrite the set-cookie
header for the response received from ALB (instead of CloudFront), though somewhere I've seen that API Gateway had some issues with multiple headers with the same name.
--
Our use case was that our web app is hosted at frontend-app.company.com
but our backend is exposed as an ALB under service.api.company.com
domain. When ALB sets cookies, they do not specify the domain name, therefore they get set on the frontend-app.company.com
domain, and don't get sent with the next request to the service.api.company.com
(making stickiness not work).
Relevant content
- asked 2 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 10 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 6 months ago
Thanks for letting me know about your support chat with them! It's disappointing that there's no ETA for this feature. We've since made plans to put our entire site behind Cloudflare and use workers to rewrite the cookies as they're coming out of AWS. AWS, if you're reading this, it would be so nice to be able to do this natively 🙏