Skip to content

Commit 118ea2e

Browse files
authored
updated filepath
1 parent 35374bc commit 118ea2e

File tree

1 file changed

+8
-8
lines changed
  • src/pages/gen1/[platform]/build-a-backend/troubleshooting/apikey-not-found

1 file changed

+8
-8
lines changed

src/pages/gen1/[platform]/build-a-backend/troubleshooting/apikey-not-found/index.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
3333
1. Navigate to the `amplify/backend/api/<apiName>/parameters.json` file in your project.
3434
2. Add the following line to the file:
3535

36-
```json title="parameters.json"
36+
```json title="amplify/backend/api/<apiName>/parameters.json"
3737
{
3838
"CreateAPIKey": 0
3939
}
@@ -48,7 +48,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
4848

4949
* Change this:
5050

51-
```json title="backend-config.json"
51+
```json title="amplify/backend/backend-config.json"
5252
{
5353
"attributes": [
5454
"GraphQLAPIIdOutput",
@@ -60,7 +60,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
6060

6161
* To this:
6262

63-
```json title="backend-config.json"
63+
```json title="amplify/backend/backend-config.json"
6464
{
6565
"attributes": [
6666
"GraphQLAPIIdOutput",
@@ -75,7 +75,7 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
7575

7676
1. Push the changes to the cloud:
7777

78-
```sh
78+
```terminal
7979
amplify push -y
8080
```
8181
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
8585
1. Remove the `CreateAPIKey: 0` entry from `amplify/backend/api/<apiName>/parameters.json`.
8686
2. Push the changes to restore the API key to the application:
8787

88-
```sh
88+
```terminal
8989
amplify push -y
9090
```
9191
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
9595

9696
1. Use the following command to update each Lambda function that was previously associated with the API:
9797

98-
```sh
98+
```terminal
9999
amplify update function
100100
```
101101
2. Follow the prompts to remove the API from the Lambda’s resources.
102102
3. Use the same command to restore the API to each Lambda function:
103103

104-
```sh
104+
```terminal
105105
amplify update function
106106
```
107107
4. Finally, push the changes to apply them:
108108

109-
```sh
109+
```terminal
110110
amplify push -y
111111
```
112112
This should complete the process and resolve the "API Key Not Found" issue.

0 commit comments

Comments
 (0)