@@ -33,7 +33,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
33
33
1 . Navigate to the ` amplify/backend/api/<apiName>/parameters.json ` file in your project.
34
34
2 . Add the following line to the file:
35
35
36
- ``` json title="parameters.json"
36
+ ``` json title="amplify/backend/api/<apiName>/ parameters.json"
37
37
{
38
38
"CreateAPIKey" : 0
39
39
}
@@ -48,7 +48,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
48
48
49
49
* Change this:
50
50
51
- ``` json title="backend-config.json"
51
+ ``` json title="amplify/backend/ backend-config.json"
52
52
{
53
53
"attributes" : [
54
54
" GraphQLAPIIdOutput" ,
@@ -60,7 +60,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
60
60
61
61
* To this:
62
62
63
- ``` json title="backend-config.json"
63
+ ``` json title="amplify/backend/ backend-config.json"
64
64
{
65
65
"attributes" : [
66
66
" GraphQLAPIIdOutput" ,
@@ -75,7 +75,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
75
75
76
76
1 . Push the changes to the cloud:
77
77
78
- ``` sh
78
+ ``` terminal
79
79
amplify push -y
80
80
```
81
81
Once this process is complete, the API key should be removed from both the application and the associated Lambda functions.
@@ -85,7 +85,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
85
85
1 . Remove the ` CreateAPIKey: 0 ` entry from ` amplify/backend/api/<apiName>/parameters.json ` .
86
86
2 . Push the changes to restore the API key to the application:
87
87
88
- ``` sh
88
+ ``` terminal
89
89
amplify push -y
90
90
```
91
91
After this step, the API key should be restored to the application but will not be associated with the Lambda functions.
@@ -95,18 +95,18 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
95
95
96
96
1 . Use the following command to update each Lambda function that was previously associated with the API:
97
97
98
- ``` sh
98
+ ``` terminal
99
99
amplify update function
100
100
```
101
101
2 . Follow the prompts to remove the API from the Lambda’s resources.
102
102
3 . Use the same command to restore the API to each Lambda function:
103
103
104
- ``` sh
104
+ ``` terminal
105
105
amplify update function
106
106
```
107
107
4 . Finally, push the changes to apply them:
108
108
109
- ``` sh
109
+ ``` terminal
110
110
amplify push -y
111
111
```
112
112
This should complete the process and resolve the "API Key Not Found" issue.
0 commit comments