/mediaLive

Example Java project to create a channel in Elemental MediaLive using Java SDK v2.

Primary LanguageJava

App

This project contains an AWS Lambda maven application with AWS Java SDK 2.x dependencies.

Prerequisites

Development

The generated function handler class just returns the input. The configured AWS Java SDK client is created in DependencyFactory class and you can add the code to interact with the SDK client based on your use case.

Building the project

mvn clean install

Testing it locally

sam local invoke

Adding more SDK clients

To add more service clients, you need to add the specific services modules in pom.xml and create the clients in DependencyFactory following the same pattern as s3Client.

Deployment

The generated project contains a default SAM template file template.yaml where you can configure different properties of your lambda function such as memory size and timeout. You might also need to add specific policies to the lambda function so that it can access other AWS resources.

To deploy the application, you can run the following command:

sam deploy --guided

See Deploying Serverless Applications for more info.