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 Antwort
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.

SUPPORT-TECHNIKER
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen