API Gateway Flashcards

1
Q

Why would you use lambda authoriser instead of IAM in the API gateway?

A

IAM works only with AWS apps internal to AWS. Lambda authoriser can use OAUTH and SAML auth schemes so can be used with apps outside of AWS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What API gateway permission scheme uses SigV4 and why would you use it?

A

IAM permissions for Lambda uses a SigV4 header to pass IAM credentials to API Gateway. You would use it when working with AWS apps that can leverage IAM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

For Lambda Authoriser, how is the token passed to the API gateway? Can the result of the call be cached

A

In the request header, and the results can be cached.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When using Lambda Authoriser - and assuming a successful auth against IAM, what must Lambda return to the API gateway?

A

A policy for the user must be returned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can API gateway be used as a cloudfront origin? Why, Why not?

A

No. API’s are highly dynamic and changeable and are not good candidates for caching in Cloudfront

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is exponential backoff and why is it used?

A

If an API call fails with to many calls, exponential backoff limits subsequent calls to the API and prevents the API becoming overloaded. Uses an exponential pattern 10ms,20,40,80,160 etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You have a group of users with facebook accounts which you want to be able to seamlessly provide access to an s3 bucket without having them log into AWS. Would you use a Cognito user pool or a federated identity pool and why?

A

Federated Identity Pool. These allow direct access to AWS resources. The client logs into the federated identity provider and receives an JWT token. This is used to authenticate and get credentials from STS. Federated identities are backed by IAM policies which authorise access to AWS resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does API gateway support GraphQL automatically?

A

No.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the default protocol for API GW endpoints?

A

HTTPS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly