Issue Title: Unable to Change Authorization Type for API to Cognito User Pools in Amplify #13947
Closed
2 tasks done
Labels
api-rest
Issues tied to REST APIs
pending-response
Issue is pending response from the issue author
pending-triage
Issue is pending triage
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v17.5.0
Amplify CLI Version
12.12.6
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
After using Amplify add api to create the api gateway for my Lamda function, I changed the authorization for the API gateway for the state to Cognito pool, then deployed the change.
Describe the bug
I used Amplify add api to create the API gateway for my Lamda function. During this process, I selected Restrict API access to Y for Authenticated users only. Despite this, the authorizationType in amplifyconfiguration.dart shows "authorizationType": "AWS_IAM".
I then changed the authorization for the API gateway via AWS Console for the state to Cognito pool, then deployed the change. But amplifyconfiguration.dart still shows "authorizationType": "AWS_IAM".
I ran amplify pull --restore, but the amplifyconfiguration.dart still shows AWS_IAM as the authorization type.
Additionally, my parameters.json file located in amplify/backend/api/<my_api_name>/build/ is empty ({}), and the correct parameters.json file does not exist in the amplify/backend/api/<my_api_name>/ directory.
Expected behavior
API gateway to use congito user pool to authenticate API calls
Reproduction steps
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: