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
Copy file name to clipboardExpand all lines: README.md
+10-43Lines changed: 10 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,31 +81,13 @@ You can choose one of the following two methods for configuration
81
81
<details>
82
82
<summary><b>🔧 Configure SwiftChat Server (Click to expand)</b></summary>
83
83
84
-
> **Note**: From v2.7.0, we recommend redeploying the SwiftChat Server for better performance with API Gateway + Lambda supporting 15-minute streaming output. Your existing API Key can be reused - you only need to update the Server URL in the app.
85
-
86
84
### Architecture
87
85
88
86

89
87
90
-
We use **API Gateway** combined with **AWS Lambda** to enable streaming responses for up to 15 minutes, as shown in
91
-
this [example](https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming).
92
-
93
-
### Step 1: Set up your API Key
94
-
95
-
1. Sign in to your AWS console and
96
-
right-click [Parameter Store](https://console.aws.amazon.com/systems-manager/parameters/) to open it in a new tab.
97
-
2. Check whether you are in the [supported region](#supported-region), then click on the **Create parameter** button.
98
-
3. Fill in the parameters below, leaving other options as default:
99
-
100
-
-**Name**: Enter a parameter name (e.g., "SwiftChatAPIKey", will be used as `ApiKeyParam` in Step 3).
88
+
We use **API Gateway** combined with **AWS Lambda** to enable streaming responses for up to 15 minutes. All requests are authenticated via API Gateway's API Key validation before being forwarded to Lambda, ensuring secure access to backend services.
101
89
102
-
-**Type**: Select `SecureString`
103
-
104
-
-**Value**: Enter any string without spaces.(this will be your `API Key` in Step 4)
105
-
106
-
4. Click **Create parameter**.
107
-
108
-
### Step 2: Build and push container images to ECR
90
+
### Step 1: Build and push container images to ECR
109
91
110
92
1. Clone this repository:
111
93
```bash
@@ -128,47 +110,32 @@ this [example](https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examp
128
110
129
111
5.**Important**: Copy the image URI displayed at the end of the script output. You'll need this in the next step.
130
112
131
-
### Step 3: Deploy stack and get your API URL
113
+
### Step 2: Deploy stack and get your API URL and API Key
2. Go to [CloudFormation Console](https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=SwiftChatAPI) and select **Upload a template file** under **Specify template**, then upload the template file you downloaded. (Make sure you are in the same region where your API Key was created.)
118
+
2. Go to [CloudFormation Console](https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=SwiftChat) and select **Upload a template file** under **Specify template**, then upload the template file you downloaded.
137
119
138
120
3. Click **Next**, On the "Specify stack details" page, provide the following information:
139
-
-**ApiKeyParam**: Enter the parameter name you used for storing the API key (e.g., "SwiftChatAPIKey")
140
-
-**ContainerImageUri**: Enter the ECR image URI from Step 2 output
121
+
-**ContainerImageUri**: Enter the ECR image URI from Step 1 output
141
122
142
123
4. Click **Next**, Keep the "Configure stack options" page as default, Read the Capabilities and Check the "I
143
124
acknowledge that AWS CloudFormation might create IAM resources" checkbox at the bottom.
144
125
5. Click **Next**, In the "Review and create" Review your configuration and click **Submit**.
145
126
146
-
Wait about 3–5 minutes for the deployment to finish, then click the CloudFormation stack and go to **Outputs** tab, you
147
-
can find the **API URL** which looks like: `https://xxx.execute-api.us-east-1.amazonaws.com/v1`
127
+
6. Wait about 1-2 minutes for the deployment to finish, then click the CloudFormation stack and go to **Outputs** tab:
128
+
-**APIURL**: Your API URL (e.g., `https://xxx.execute-api.us-east-1.amazonaws.com/v1`)
129
+
-**ApiKeyConsole**: Click this URL to open the API Gateway API Keys console, find the key named `SwiftChat-api-key` and copy the API Key value
148
130
149
-
### Step 4: Open the App and setup with API URL and API Key
131
+
### Step 3: Open the App and setup with API URL and API Key
150
132
151
133
1. Launch the App, open the drawer menu, and tap **Settings**.
152
-
2. Paste the `API URL` and `API Key`(The **Value** you typed in Parameter Store) Under Amazon Bedrock -> SwiftChat
153
-
Server, then select your Region.
134
+
2. Paste the `API URL` and `API Key` under Amazon Bedrock -> SwiftChat Server, then select your Region.
154
135
3. Click the top right ✓ icon to save your configuration and start your chat.
155
136
156
137
Congratulations 🎉 Your SwiftChat App is ready to use!
0 commit comments