copy jar code and call lambda from lacal

0

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.

Jess
已提问 2 年前237 查看次数
1 回答
0

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.

支持工程师
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则