amazon web services - Can I allow programatic access to my API, running behind an application load balancer with cognito auth? -

admin2025-04-16  5

I want to be able to deploy web apps made by people in my company, but I don't want to have to modify our code for auth. We can protect access to our frontend with an application load balancer easily, but I don't know how to protect the API easily whilst still allowing for programatic access to the API.

It seems like the ALB creates a cookie called AWSELBAuthSessionCookie, however to access the API via python, I would need to add an Authorization Bearer header.

It this currently possible with AWS's ALB?

I want to be able to deploy web apps made by people in my company, but I don't want to have to modify our code for auth. We can protect access to our frontend with an application load balancer easily, but I don't know how to protect the API easily whilst still allowing for programatic access to the API.

It seems like the ALB creates a cookie called AWSELBAuthSessionCookie, however to access the API via python, I would need to add an Authorization Bearer header.

It this currently possible with AWS's ALB?

Share Improve this question asked Feb 2 at 21:28 Tom McLeanTom McLean 6,3611 gold badge21 silver badges51 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

ALB doesn't natively support Authorization: Bearer headers. You can use a Cognito User Pool with API Gateway for JWT validation or a Lambda Authorizer as middleware for authentication.

转载请注明原文地址:http://anycun.com/QandA/1744785465a87592.html