You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Existing Amazon API Gateway resources can be used with the Amplify Libraries by referencing your API Gateway **endpoint** and configuring authorization in your `amplify_outputs.json` file.
-**your-api-name**: Friendly name for the API (e.g., *api*)
53
-
-**endpoint**: The HTTPS endpoint of the API (e.g. *https://aaaaaaaaaa.execute-api.us-east-1.amazonaws.com/api*)
54
-
-**region**: AWS Region where the resources are provisioned (e.g. *us-east-1*)
55
-
-**authorizationType**: Authorization mode for accessing the API. This can be one of: `NONE`, `AWS_IAM`, `AMAZON_COGNITO_USER_POOLS`, or `API_KEY`. Each mode with the exception of `NONE` requires additional configuration parameters. See [Configure authorization modes](/[platform]/build-a-backend/add-aws-services/rest-api/customize-authz/) for details.
56
-
57
-
Note that before you can add an AWS resource to your application, the application must have the Amplify libraries installed. If you need to perform this step, see [Install Amplify Libraries](/[platform]/build-a-backend/add-aws-services/rest-api/set-up-rest-api/#install-amplify-libraries).
Existing Amazon API Gateway resources can be used with the Amplify Libraries by calling `Amplify.configure()` with the API Gateway API name and options. Note, you will need to supply the full resource configuration and library options objects when calling `Amplify.configure()`. The following example shows how to configure additional API Gateway resources to an existing Amplify application:
64
30
65
-
```javascript
31
+
```ts
66
32
import { Amplify } from'aws-amplify';
67
33
importoutputsfrom'../amplify_outputs.json';
68
34
Amplify.configure(outputs):
@@ -91,5 +57,3 @@ Amplify.configure({
91
57
-**region**: AWS Region where the resources are provisioned. If not specified, the region will be inferred from the endpoint.
92
58
93
59
Note that before you can add an AWS resource to your application, the application must have the Amplify libraries installed. If you need to perform this step, see [Install Amplify Libraries](/[platform]/build-a-backend/add-aws-services/rest-api/set-up-rest-api/#install-amplify-libraries).
0 commit comments