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
+40-15Lines changed: 40 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,37 +82,62 @@ this [example](https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examp
82
82
2. Check whether you are in the [supported region](#supported-region), then click on the **Create parameter** button.
83
83
3. Fill in the parameters below, leaving other options as default:
84
84
85
-
-**Name**: Enter a parameter name (e.g., "SwiftChatAPIKey", will be used as `ApiKeyParam` in Step 2).
85
+
-**Name**: Enter a parameter name (e.g., "SwiftChatAPIKey", will be used as `ApiKeyParam` in Step 3).
86
86
87
87
-**Type**: Select `SecureString`
88
88
89
-
-**Value**: Enter any string without spaces.(this will be your `API Key` in Step 3)
89
+
-**Value**: Enter any string without spaces.(this will be your `API Key` in Step 4)
90
90
91
91
4. Click **Create parameter**.
92
92
93
-
### Step 2: Deploy stack and get your API URL
93
+
### Step 2: Build and push container images to ECR
94
94
95
-
1. 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 use one of the following templates to deploy. (Make sure you are in the same region where your API Key was created.)
Open [SwiftChatAppRunner.template](https://github.com/aws-samples/swift-chat/blob/main/server/template/SwiftChatAppRunner.template), then download and upload the file.
107
+
3. Follow the prompts to configure:
108
+
- ECR repository name (or use default: `swift-chat-api`)
109
+
- Image tag (please use default: `latest`)
110
+
- AWS region (the region you want to deploy, e.g.,: `us-east-1`)
4. The script will build and push the Docker image to your ECR repository.
102
116
103
-
Open [SwiftChatLambda.template](https://github.com/aws-samples/swift-chat/blob/main/server/template/SwiftChatLambda.template) then download and upload the file.
117
+
5.**Important**: Copy the image URI displayed at the end of the script output. You'll need this in the next step.
104
118
105
-
2. Click **Next**, On the "Specify stack details" page, provide the following information:
106
-
- Fill the `ApiKeyParam` with the parameter name you used for storing the API key (e.g., "SwiftChatAPIKey").
107
-
- For App Runner, choose an `InstanceTypeParam` based on your needs.
108
-
3. Click **Next**, Keep the "Configure stack options" page as default, Read the Capabilities and Check the "I
119
+
### Step 3: Deploy stack and get your API URL
120
+
121
+
1. Download the CloudFormation template you want to use:
122
+
- For App Runner: [SwiftChatAppRunner.template](https://github.com/aws-samples/swift-chat/blob/main/server/template/SwiftChatAppRunner.template)
123
+
- For Lambda: [SwiftChatLambda.template](https://github.com/aws-samples/swift-chat/blob/main/server/template/SwiftChatLambda.template)
124
+
125
+
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.)
126
+
127
+
3. Click **Next**, On the "Specify stack details" page, provide the following information:
128
+
-**Stack name**: Keep the default "SwiftChatAPI" or change if needed
129
+
-**ApiKeyParam**: Enter the parameter name you used for storing the API key (e.g., "SwiftChatAPIKey")
130
+
-**ContainerImageUri**: Enter the ECR image URI from Step 2 output
131
+
- For App Runner, choose an **InstanceTypeParam** based on your needs
132
+
133
+
4. Click **Next**, Keep the "Configure stack options" page as default, Read the Capabilities and Check the "I
109
134
acknowledge that AWS CloudFormation might create IAM resources" checkbox at the bottom.
110
-
4. Click **Next**, In the "Review and create" Review your configuration and click **Submit**.
135
+
5. Click **Next**, In the "Review and create" Review your configuration and click **Submit**.
111
136
112
-
Wait about 3-5 minutes for the deployment to finish, then click the CloudFormation stack and go to **Outputs** tab, you
137
+
Wait about 3–5 minutes for the deployment to finish, then click the CloudFormation stack and go to **Outputs** tab, you
113
138
can find the **API URL** which looks like: `https://xxx.xxx.awsapprunner.com` or `https://xxx.lambda-url.xxx.on.aws`
114
139
115
-
### Step 3: Open the App and setup with API URL and API Key
140
+
### Step 4: Open the App and setup with API URL and API Key
116
141
117
142
1. Launch the App, open the drawer menu, and tap **Settings**.
118
143
2. Paste the `API URL` and `API Key`(The **Value** you typed in Parameter Store) Under Amazon Bedrock -> SwiftChat
0 commit comments