CloudFront function or Lambda@edge

0

I am attempting to validate a jwt. Should I used CloudFront function or Lambda@edge?

질문됨 10달 전717회 조회
3개 답변
1
수락된 답변

Using Lambda@Edge is preferred because it allows you to utilize libraries that may not be available on CloudFront Functions.

Here is a good article describing this in detail: https://medium.com/trackit/cloudfront-functions-vs-lambda-edge-which-one-should-you-choose-c88527647695

profile picture
답변함 10달 전
profile pictureAWS
전문가
검토됨 10달 전
1

In terms of JWT validation, in my opinion you might want to consider CloudFront Functions as it provides the lowest possible latency with available free tier pricing.

Here's a quick comparison table in the document: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions.html#edge-functions-choosing

Meanwhile, here's example CloudFront Functions that validates a JWT in the query string of a request which might be of help: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-validate-token.html

AWS
weidi
답변함 10달 전
profile picture
전문가
검토됨 한 달 전
0

Another thing to consider is security. The CloudFront Function can't access KMS or Secrets Manager so you have to store the secret key in the source code. LambdaEdge will allow you to make use of purpose built secure storage to reduce the risk of key exposure. If you ever need to rotate the key, add a new key, etc. This is all a configuration change versus new code.

profile pictureAWS
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인