By using AWS re:Post, you agree to the Terms of Use
/copy jar code and call lambda from lacal/

copy jar code and call lambda from lacal


Hi Team,

I have a maven project to sync a changesets on my databases in different environments via a lambda function.

after I add my DB changeset on the file

  1. run mvn package
  2. copy the generated .jar on my lambda
  3. run the lambda(for local DB) to reflect new changes on the DB.

loclly those steps are manual, so I run the lambda against my local DB to make sure everything is ok before pushing the changes in my repo to reflect the changes automatically in others env.

I would like to automate those 3 steps locally so I don't do them manually each time I have to make a change in my DB.

In other env those steps are automated via the BuildSpec file.

I would like to know if there is a best way to automate them in local (script ? ... buid the project mvn, copy the jar, run the lambda, get response from lambda...)

Thank you.

1 Answers

Hi there, yes similar to the BuildSpec file, in local you can create a script or along with a cron job that run these tasks automatically. In your script you can run build commends or invoke another build script, invoke lambda via AWS CLI, and parse the response to do whatever actions needed.

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions