From the course: Cloud Native Projects: AWS Serverless
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Deploying and running a Java Lambda function - Amazon Web Services (AWS) Tutorial
From the course: Cloud Native Projects: AWS Serverless
Deploying and running a Java Lambda function
- [Instructor] In the previous video, we created a Java application that would run as a Lambda function. In this video, we're going to take that code, compile it, package it, deploy it, and then invoke it in an effort to show you that the operations are really very similar with Java as they were with Python. Now I want you to jump into your command line and navigate to the directory containing your pom file from the previous video. All right, our first step here is to do a maven clean package. And you'll see if you read the output that the shade plugin runs and what this does is it takes all of our dependencies and actually packages them into the jar file. So this jar file is a self-contained jar file that includes everything that is needed for execution. Now I'm going to do a little LS on the target directory just so you can see the Java demo snapshot jar. The original one is one that has not been shaded so…
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.