简体   繁体   中英

AWS Amplify branch is missing functions

We're using a few Git code branches to manage the Amplify lifecycle ( dev , qa , pre-prod , main ) and have a working application on the dev branch. I can amplify push and it all works OK for dev.

There are 5 Java lambda functions in the codebase as well as their associated API Gateway endpoints.

I have git merged the codebase from dev to qa which seemed to go OK, but when I try and amplify push it only knows about one of the lambda functions; it doesn't even seem to want to push the other 4 lambda functions.

I have looked through and compared as many Amplify config json files in the project as I can see on the qa branch and can see references to all the missing lambda functions as well as see them referred to in the api gateway config folder.

I was trying to follow this: https://docs.amplify.aws/cli/teams/overview/

The process I followed was:

git checkout qa
amplify env checkout qa
git merge dev
amplify push

and it shows just one lambda function will be updated not all 5.

If I do an amplify pull then it deletes all the function code that is local (which I clearly don't want!)

My amplify/backend/backend-config.json contains an entry for each of the functions, as does the file amplify/backend/api/tcsogatewayapi/cli-inputs.json

If I do a amplify function update it only shows the one function - where does it look for the list of functions it knows about?

Anyone know how I can resolve this?

OK, so I tried a few things and this seemed to work; it was the amplify init that seemed to re-add all of the missing functions

git checkout qa
amplify env checkout qa
amplify pull
git merge dev
amplify init
amplify build
amplify push

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM