这是一个美国的云计算的Quiz作业代写
1. You have a payment API that calls a third party API service to make payments. The API receives
millions of requests per hour. At some point, the payment service starts failing intermittently due to the
high volume of transactions.
How would you re-architect the system to ensure that all payments are processed without an
impact to the customer experience?
2. When you call the API from your frontend application hosted at http://www.yourdomain.com, you get
the following error in the developer
console:
“No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin
‘http://www.yourdomain.com’ is therefore not allowed access.”
What is the reason for this error? How do you resolve it? (describe every step)
3. You create a new Lambda function that returns the text “Hello world”. You test it and it completes the
execution in a few milliseconds. You then decide to use it to store a message in a DynamoDB table. You
add code to do just that, on top of the original code. Upon testing the new version of the function, it times
out after 3 seconds, over and over again.
What might be the issue and how can you resolve it?
4. You create a new intent called HotelBookingIntent in Lex. You add a few utterances and build it. When
you start testing it in the Lex test console, everything works as expected. You then write code to call your
Lex bot from the Lambda function, but when you make calls to your API, the Lambda function times out.
What is the most likely reason for the Lambda function timing out when connected with the Lex bot,
while everything is working correctly through the Lex test console?
5. For the following questions, imagine you have the following resources on AWS: an API Gateway
deployment, a Lambda function connected to one of the API Gateway methods that responds to each
request, and a Lex bot called “Concierge”. You create a new intent called HotelBookingIntent in Lex. You
add a few utterances and build it. When you start testing it in the Lex test console, everything works as
expected. You then write code to call your Lex bot from a Lambda function, but all the incoming
messages are not understood by the Lex bot.
What is the most likely reason for Lex failing to understood messages sent through the Lambda function,
yet everything working correctly through the Lex test console?
You will design a food delivery app that will allow you to order food online. You could draw inspiration
from any of the food delivery apps you use. You are required to list the set of APIs, backend architecture,
data store design and event interactions as part of this system design for the following requirements:
Users:
• Login and set profile to configure their address, phone contact, payment information.
• Order food from menus of restaurants near your zip code, provide delivery address, and do online
payment. You could assume external APIs for payment etc. For example, you may assume
Paypal for payment.
• You are emailed a copy of your order with payment details to your mobile phone as SMS or email
based on your set preference.
• You get a notification back once the restaurant received the order and processed it with an
estimated time for the delivery.
Restaurants:
• Restaurants sign in to create an account for its location with menu/price.
• The restaurants could update the menu.
• Restaurants confirm order and provide you estimated time for delivery and a contact number for
the delivery person. You contact number is shared by the backend to the delivery person.
What you need to provide:
1. Scalable backend architecture details along the lines of Assignment 1.
2. List of APIs that the food ordering app (both for users and restaurants) need to support the
requirements that are listed above.
3. List of Lambda functions to support these set of APIs.
4. Data models (just informal description is fine) and where these would be stored. You should
consider appropriate databases/datastores for various data pieces for optimal performance.
5. You need to detail the event interaction for the user ordering the food function starting from API to
API gateway to Lambda(s) and data stores. This should show the interaction among these for this
specific function.
State your assumptions you are making. Your application should scale to millions of users and should be
event driven and asynchronous.