This is the DIY challenge of the Serverless Foundations task in AWS Cloud Quest.
DIY Steps:
- Change source code in the Lambda function
labFunction
-
Replace source code by the following:
def lambda_handler(event, context): emoji_type = event["emoji_type"] message = event["message"] feeling = "negative" if emoji_type == 0: feeling = "positive" elif emoji_type == 1: feeling = "neutral" response = { "feeling": feeling, "message": message } return response
Deploy your changes
Top comments (0)