Reference no: EM132995236
Assignment Overview
The assignment has three parts - Part A (Lambda function), Part B (REST API), and Part C (Report). In Part A, you need to create a Lambda function and its underlying handler method. In Part B, you need to create a REST API that will integrate the Lambda function you have created in Part A. In Part C, you will need to write a reflection report discussing what you have learnt and issues and challenges you have faced and how you have resolved them.
Part A - Lambda Function
Overview: The REST API will be invoked with a query parameter, id. You Lambda function should receive this request and retrieve a DynamoDB item corresponding to this id. Following this, the handler method should return the retrieved item back as response. You need to use the DynamoDB table, Car that you had created during Assignment 2. The schema of the DynamoDB table is given below.
Car (Id, Model, Make, Year, Colour); Model, Make, Colour: String, Id, Year: Number
Details: You Lambda function and handler method must have the following functionalities.
• Name your Lambda function as yourSCUusername-a3-function.
• Receives a query parameter id from the REST API.
• Retrieves a corresponding item from the DynamoDB table, Car using the value of the id. You need to implement the DynamoDB read functionality (refer to week 8 workshop) for this particular functionality.
• Returns a string message including the value of all table fields - Id, Make, Model, Year, and Colour. If the id not found in the table, then returns a message "no item found with id = [value of the id], try another id".
• Use appropriate exception handling and detailed comments.
• You need to make necessary changes in the execution role to allow API Gateway to access your Lambda function.
Part B - REST API
Overview: You need to create a REST API and integrate the Lambda function (from Part A). The API must be invoked with a car identifier and return the details of the car.
Details:
• Create a REST API named youSCUusername-rest-api.
• Add necessary integration with the Lambda function (from Part A).
• The REST API should integrate a HTTP ANY method.
• Make necessary changes to "Method Request" and "Integration Request".
• Deploy the API with a stage named yourSCUusername-stage.
• Record the Invoke URL.
• Upon invocation with the car identified (i.e., id), the API must returns a message either with the car details, or with a warning.
Part C - Report
Overview: You need to write a 500 words report (named yourSCUusername_a3_report.docx) on what you have learnt, what issues you have faced and how you have resolved that.
Details: With your 400-word report you need to discuss/describe the followings.
• Changes you have made to your handler method. Issues/challenges/errors you have faced while doing this changes and how you resolved them (e.g., forum, tutor, and trial-error).
• Any issues/challenges/errors you faced while creating the REST API. How those issues were resolved.
• Add the RESR API Invoke URL you recorded in Part B in this report.
Attachment:- Assignment.rar