Skip to content

Commit de0cfec

Browse files
authored
updates
1 parent 90a873f commit de0cfec

File tree

1 file changed

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

1 file changed

+25
-18
lines changed

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

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
4141
1. Open the `backend/backend-config.json` file.
4242
2. Locate any JSON attribute arrays that include `GraphQLAPIKeyOutput`.
4343
3. Modify the arrays by removing the `GraphQLAPIKeyOutput` entry. For example:
44-
- Change this:
44+
* Change this:
45+
4546
```json
4647
"attributes": [
4748
"GraphQLAPIIdOutput",
@@ -50,8 +51,9 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
5051
]
5152
```
5253

53-
- To this:
54-
```json
54+
* To this:
55+
56+
```ts
5557
"attributes": [
5658
"GraphQLAPIIdOutput",
5759
"GraphQLAPIEndpointOutput"
@@ -62,16 +64,18 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
6264

6365
## Step 3: Apply the Changes
6466

65-
Push the changes to the cloud:
66-
```sh
67-
amplify push -y
68-
```
69-
Once this process is complete, the API key should be removed from both the application and the associated Lambda functions.
67+
1. Push the changes to the cloud:
68+
69+
```sh
70+
amplify push -y
71+
```
72+
Once this process is complete, the API key should be removed from both the application and the associated Lambda functions.
7073

7174
## Step 4: Restore the API Key
7275

73-
1. Remove the CreateAPIKey: 0 entry from api/[name]/parameters.json.
76+
1. Remove the `CreateAPIKey: 0` entry from `api/[name]/parameters.json`.
7477
2. Push the changes to restore the API key to the application:
78+
7579
```sh
7680
amplify push -y
7781
```
@@ -81,16 +85,19 @@ If you're encountering an "API Key Not Found" issue in your Amplify project, fol
8185
## Step 5: Update Lambda Function Resources
8286

8387
1. Use the following command to update each Lambda function that was previously associated with the API:
84-
```sh
85-
amplify update function
86-
```
88+
89+
```sh
90+
amplify update function
91+
```
8792
2. Follow the prompts to remove the API from the Lambda’s resources.
8893
3. Use the same command to restore the API to each Lambda function:
89-
```sh
90-
amplify update function
91-
```
94+
95+
```sh
96+
amplify update function
97+
```
9298
4. Finally, push the changes to apply them:
93-
```sh
94-
amplify push -y
99+
100+
```sh
101+
amplify push -y
95102
```
96-
This should complete the process and resolve the "API Key Not Found" issue.
103+
This should complete the process and resolve the "API Key Not Found" issue.

0 commit comments

Comments
 (0)