Joy
Joy

Reputation: 4483

Deploying a Java based Lambda package to S3 bucket

I am working on a Lambda project in Java. Actually, I have already packaged it as a jar. As part of the deployment, I would like to upload this jar to s3 bucket.

While setting up the lambda function, I would like to specify the s3 key of the uploaded jar. I have seen quite a few examples over the internet. But most of them talk about either Js or Python. A few of the articles are there also related to Java but do not specify concretely how to do this.

Could anyone please help here? Thanks.

EDIT

I am using Terraform to create my lambda function, where I have to pass the s3 bucket along with the s3 key of the uploaded Lambda jar.

Upvotes: 0

Views: 410

Answers (1)

smac2020
smac2020

Reputation: 10704

There are various articles that show you how to use the Java Lambda runtime API to build Lambda functions that perform various use cases. These are in the Java V2 Github repo:

1 - Creating an Amazon Web Services Lambda function that tags digital assets located in Amazon S3 buckets

2 - Using AWS Step Functions and the AWS SDK for Java to build workflows that sends notifications over multiple channels

3- Creating scheduled events to invoke Lambda functions

All of these examples provide you with step by step instructions and show you how to build Lambda functions using the Lambda Java runtime API that interact with other AWS Services. For example, the 1st one shows you how to build a Lambda function that can automatically tag images in an Amazon S3 bucket.

Upvotes: 2

Related Questions