In this video, see the solution and learn why the time may not be the same as your local time.
- [Instructor] Here is how I solved the challenge.…Just below where all of our current routes are,…I'm going to create my new one.…It has to accept the get method,…so we are going to begin with the get handler.…The path has to be /time.…Again we're going to use a Lambda expression.…We don't need either the request, nor the response.…But this time I'm going to open it up just a little bit,…and our message return is going to be…current date and time are:…and then we are going to use a string interpolation,…and inside this string interpolation were going to put…local\datetime.now…and we are going to go ahead…and let it import that method for us.…
Local date time now, were new in Java 8.…So now we go back down to the terminal window.…We're going to say Mavin, mvn package…let this build itself again.…And once that's done, we go back to the Lambda expression,…to the Lambda console and we want to do an upload.…We double click on our lambda1-1.0.jar.…
This time we're just going to save it,…there's no need to test it here.…
- Creating an AWS Lambda account
- Creating a simple Lambda function in Node.js
- Testing the Lambda function
- Creating Kotlin apps with Spark, IntelliJ IDEA, Maven, and the AWS library
- Binding the API gateway to your Lambda function
- Adding data with MongoDB
- Developing and debugging your Lambda function locally
Skill Level Intermediate
1. About AWS Lambda
2. Hello Lambda
3. Hello Kotlin Lambda
4. Making Your Lambda Web Visible
5. Adding Data with MongoDB
6. Developing and Debugging Locally
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.