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
feat: add instructions for adding event api to backend (#8155)
* feat: add instructions for adding event api to backend
* Apply suggestions from code review
Co-authored-by: josef <[email protected]>
---------
Co-authored-by: josef <[email protected]>
## Connect to an Event API with an existing Amplify backend
101
+
## Add an Event API to an existing Amplify backend
102
102
103
-
Coming Soon
103
+
This guide walks through how you can add an Event API to an existing Amplify backend. We'll be using Cognito User Pools for authenticating with Event API from our frontend application. Any signed in user will be able to subscribe to the Event API and publish events.
104
+
105
+
Before you begin, you will need:
106
+
107
+
- An existing Amplify backend (see [Quickstart](/[platform]/start/quickstart/))
108
+
- Latest versions of `@aws-amplify/backend` and `@aws-amplify/backend-cli` (`npm add @aws-amplify/backend@latest @aws-amplify/backend-cli@latest`)
109
+
110
+
### Update Backend Definition
111
+
112
+
First, we'll add a new Event API to our backend definition.
To test your changes, deploy your Amplify Sandbox.
198
+
199
+
```bash title="Terminal" showLineNumbers={false}
200
+
npx ampx sandbox
201
+
```
202
+
203
+
### Connect your frontend application
204
+
205
+
After the sandbox deploys, connect your frontend application to the Event API. We'll be using the [Amplify Authenticator component](https://ui.docs.amplify.aws/react/connected-components/authenticator) to sign in to our Cognito User Pool.
206
+
207
+
If you don't already have the Authenticator installed, you can install it by running `npm add @aws-amplify/ui-react`.
0 commit comments