From the course: Java: Serverless Applications on AWS
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Challenge: Customize handler method with new input/output
From the course: Java: Serverless Applications on AWS
Challenge: Customize handler method with new input/output
(upbeat music) - In this challenge, you're asked to write the custom handler method with new input and output. Imagine we want to build a function that checks if a customer who's shopping on some eCommerce website can receive a promotion. In this challenge, we want you to write a lambda function that accepts cart data and returns if the customer is eligible to receive a promotion. In case the cart sum is higher than 1000, then the customer can get a 10 percent discount. In case the cart contains coupon code freeshipping, then the customer is eligible for free shipping. As an output, you need to return promotion data with reduced price, free shipping flag and a promotion message. This challenge should take about 10 minutes. If you get stuck, you can check out my solution video to see how I solved the challenge.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.