amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

APIGatewayAuthStack.json is removed on pull, added on push

Open franklin113 opened this issue 2 years ago • 15 comments

Whenever I pull an env the APIGatewayAuthStack.json is removed. Then when I push it adds it back. Should APIGatewayAuthStack.json be in the gitignore? Otherwise it keeps changing my repo.

Which Category is your question related to? api Amplify CLI Version 8.1.0 What AWS Services are you utilizing? Cognito, lambda,

franklin113 avatar May 01 '22 14:05 franklin113

yes i've seen this too in our repo

hisham avatar May 10 '22 17:05 hisham

Hey @franklin113 and @hisham I was able to reproduce this issue, and this doesn't appear to be the intended behavior. Marking as a bug 🙂

josefaidt avatar May 13 '22 19:05 josefaidt

After further consideration I've adjusted the labels from bug to feature request and labeled as a p3 for the team to evaluate further 🙂

josefaidt avatar May 17 '22 18:05 josefaidt

I'm seeing this issue as well. It is confusing, b/c I'm not sure if that file is still needed if amplify pull is deleting it.

chrisl777 avatar Sep 24 '22 19:09 chrisl777

I am regularly seeing this issue which is causing issues running locally.

matt-d-webb avatar Oct 02 '22 22:10 matt-d-webb

Any movement on this? I am seeing this as well. The APIGatewayAuthStack.json file is removed when running amplify pull

emilian avatar Jan 09 '23 16:01 emilian

I am seeing this too. And now I have a CORS issue. Could this be related? [UPDATE 1] YES. I replaced it in the next build and it appears to fix my CORS issue. So seems like a bug to me. [UPDATE 2] Actually, I had a separate build issue.. not so sure this is a bug now.

chrismorse avatar Jan 10 '23 23:01 chrismorse

This keeps happening specially when another computer/developer tries to amplify pull into their local environment after git cloning the amplify repo. The amplify pull will still delete the file, in our case we're using Amplify CLI Version 10.6.2.

jpulgar4 avatar Jan 18 '23 17:01 jpulgar4

@josefaidt What is the status of this? Still seeing this issue even in latest amplify v11.0.2.

Are their any known work arounds?

swordfish444 avatar Mar 21 '23 16:03 swordfish444

According to this medium post:

If you run into this issue you have 2 options:

  1. Update your API authentication stack to the new cli-inputs.json format

or

  1. Configure AWS Amplify to use the previous version 7.4.5

It doesn't explain how to update to the new cli-inputs.json format, though.

sarah-adams avatar Mar 21 '23 18:03 sarah-adams

Same here

armanian avatar Oct 26 '23 17:10 armanian

And here

sakaal avatar Jan 28 '24 18:01 sakaal

Same here, amplify CLI version 12.1.0

Frank-ZhangXin avatar Apr 01 '24 18:04 Frank-ZhangXin

The same issue with amplify\backend\api\APIGatewayAuthStack.json after amplify pull.

I don't understand what to do: restore it every time or remove.

chirpavel avatar Aug 19 '24 08:08 chirpavel

same here, bump it

Frank-ZhangXin avatar Sep 05 '24 21:09 Frank-ZhangXin