DEV Community

architec
architec

Posted on • Updated on

AWS Cloud Quest: Serverless Foundations Study Note

This is the DIY challenge of the Serverless Foundations task in AWS Cloud Quest.

DIY Steps:

  1. Change source code in the Lambda function labFunction
  2. 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
    
  3. Deploy your changes

Top comments (0)