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.

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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠