serverless computing Flashcards

1
Q

How does API Gateway deal with legacy SOAP applications

Converts the response from the application to XML

Converts the response from the application to HTML

Provides webservice passthrough for SOAP applications

Converts the response from the application to REST

A

Provides webservice passthrough for SOAP applications

SOAP applications send their responses in XML format. API Gateway supports SOAP applications but only provides passthrough. API gateway does not transform or convert the responses.

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

You are a developer for a busy real estate company and you want to enable other real estate agents to the ability to show properties on your books, but skinned so that it looks like their own website. You decide the most efficient way to do this is to create is to expose your API to the public. The project works well, however one of your competitors starts abusing this, sending your API tens of thousands of requests per second. This generates a HTTP 429 error. Each agent connects to your API using individual API keys. What actions can you take to stop this behaviour?

Deploy multiple API Gateways and give the agent access to another API Gateway.

Throttle the agents API access using the individual API Keys

Place an AWS Web Application Firewall in front of API gateway and filter the requests.

Use AWS Shield Advanced API protection to block the requests.

A

Throttle the agents API access using the individual API Keys

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

You have created a simple serverless website using S3, Lambda, API Gateway and DynamoDB. Your website will process the contact details of your customers, predict an expected delivery date of their order and store their order in DynamoDB. You test the website before deploying it in to production and you notice that although the page executes, and the lambda function is triggered, it is unable to write to DynamoDB. What could be the cause of this issue?

The availability zone that Lambda is hosted in is down.

Your lambda function does not have the sufficient Identity Access Management (IAM) permissions to write to DynamoDB.

You have written your function in python which is not supported as a run time environment for Lambda.

The availability zone that DynamoDB is hosted in is down.

A

Your lambda function does not have the sufficient Identity Access Management (IAM) permissions to write to DynamoDB.

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

You have launched a new web application on AWS using API Gateway, Lambda and S3. Someone posts a thread to reddit about your application and it starts to go viral. You start receiving 10,000 requests every second and your you notice that that most requests are similar. Your web application begins to struggle. What can you do to optimize performance of your application?

Change your route53 alias record to point to AWS Neptune and then configure Neptune to filter your API requests to genuine requests only.

Enable API Gateway caching to cache frequent requests.

Enable API Gateway Accelerator.

Migrate your API Gateway to an Network Load Balancer and enable session stickiness for all sessions.

A

Enable API Gateway caching to cache frequent requests.

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

You work for a gaming company that has built a serverless application on AWS using Lambda, API Gateway and DynamoDB. They release a new version of the lambda function and the application stops working. You need to get the application up and back online as fast as possible. What should you do?

DynamoDB is not serverless and is causing the error. Migrate your database to RDS and redeploy the lambda function.

Roll your lambda function back to the previous version.

Create a CloudFormation template of the environment. Deploy this template to a separate region and then redirect Route53 to the new region.

The new function has some dependencies not available to lambda. Redeploy the application on EC2 and put the EC2 instances behind a network load balancer.

A

Roll your lambda function back to the previous version.

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

You have an internal API that you use for your corporate network. Your company has decided to go all in on AWS to reduce their data center footprint. They will need to leverage their existing API within AWS. What is the most efficient way to do this.

Recreate the API manually.

Use the Swagger Importer tool to import your API in to API Gateway.

Replicate your API to API Gateway using the API Replication Master.

Use AWS API Import/Export feature of AWS Storage Gateway.

A

Use the Swagger Importer tool to import your API in to API Gateway.

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

You are developing a new application using serverless infrastructure and are using services such as S3, DynamoDB, Lambda, API Gateway, CloudFront, CloudFormation and Polly. You deploy your application to production and your end users begin complaining about receiving a HTTP 429 error. What could be the cause of the error?

Your cloudformation stack is not valid and is failing to deploy properly which is causing a HTTP 429 error.

You have an S3 bucket policy which is preventing lambda from being able to write files to your bucket, generating a HTTP 429 error.

You enabled API throttling for a rate limit of 1000 requests per second while in development and now that you have deployed to production your API Gateway is being throttled.

Your lambda function does not have sufficient permissions to read to DynamoDB and this is generating a HTTP 429 error.

A

You enabled API throttling for a rate limit of 1000 requests per second while in development and now that you have deployed to production your API Gateway is being throttled.

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

You have created a serverless application which converts text in to speech using a combination of S3, API Gateway, Lambda, Polly, DynamoDB and SNS. Your users complain that only some text is being converted, whereas longer amounts of text does not get converted. What could be the cause of this problem?

Your lambda function needs a longer execution time. You should check how long is needed in the fringe cases and increase the timeout inside the function to slightly longer than that.

AWS X-ray service is interfering with the application and should be disabled.

Polly has built in censorship, so if you try and send it text that is deemed offensive, it will not generate an MP3.

You’ve placed your DynamoDB table in a single availability zone which is currently down, causing an outage.

A

Your lambda function needs a longer execution time. You should check how long is needed in the fringe cases and increase the timeout inside the function to slightly longer than that.

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

You have designed a serverless learning management system and you are ready to deploy your code in to a test/dev environment. The system uses a combination of Lambda, API Gateway, S3 and CloudFront and is architected to be highly available, fault tolerant and scalable. What are the three different ways you can deploy your code to lambda. (Choose 3)

Import your code to Amazon’s Glacier and change your Lambda execution handler to point to glacier.

Write a CloudFormation template that will deploy your environment including your code.

Zip your code into a zip file and upload it via the Lambda console.

Upload your code to S3 and use a MySQL connection string to connect Lambda to your S3 bucket.

Copy and paste your code in to the integrated development environment (IDE) inside Lambda.

A

Write a CloudFormation template that will deploy your environment including your code.

Zip your code into a zip file and upload it via the Lambda console.

Copy and paste your code in to the integrated development environment (IDE) inside Lambda.

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

Which of the following services does X-ray integrate with? (Choose 3)

API Gateway

Elastic Load Balancer

S3

Lambda

A

API Gateway

Elastic Load Balancer

Lambda

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

You have created an application using serverless architecture using Lambda, Api Gateway, S3 and DynamoDB. Your boss asks you to do a major upgrade to API Gateway and you do this and deploy it to production. Unfortunately something has gone wrong and now your application is offline. What should you do to bring your application up as quickly as possible?

Delete the existing API Gateway.

Rollback your API Gateway to the previous stage.

Restart API Gateway for the new changes to take effect.

Restore your previous API gateway configuration using an EBS snapshot.

A

Rollback your API Gateway to the previous stage.

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