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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南