Skip to content

Commit

Permalink
re-organize the CFN template deployment documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
spenlep-amzn committed Mar 5, 2024
1 parent 9e185e7 commit 9a0e21c
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 240 deletions.
19 changes: 0 additions & 19 deletions .github/depoyment-docs/CREATION_DEMO.md

This file was deleted.

110 changes: 0 additions & 110 deletions .github/depoyment-docs/DEPLOYMENT_CONTEXT.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/depoyment-docs/README.md

This file was deleted.

97 changes: 0 additions & 97 deletions .github/depoyment-docs/USAGE.md

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
92 changes: 92 additions & 0 deletions .github/docs/cfn-template-deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Updating the CloudFormation Template Assets

## Prerequisites

- Gain access to the AWS Account (`533267401313`), follow the steps listed in [this Quip](https://quip-amazon.com/4zxjAXyttjeI)
- Install [AWS CLI (v2)](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

## Deployment

Follow these instructions to update the S3 assets. A local folder will be mirrored to the S3 bucket, and set to public

1. Create a local folder named in `startChatContactAPI` or `urlPreviewForAsync` (in the same directory as `deploymentScript.sh`)

2. Update `config.sh` file, pointing to the desired account and S3 bucket

```diff
+ export ACCOUNT_ID="<AccountId>"
+ export CONSOLE_ROLE_NAME="<ConsoleRoleName>"

- export LOCAL_BUCKET_FOLDER="<REPLACE_ME>"
+ export LOCAL_BUCKET_FOLDER="startChatContactAPI"
export BUCKET_TO_UPDATE="start-chat-contact-api-cfn"
+ export FILES_TO_UPLOAD=(
# "cloudformation.yaml"
# "deployment/ChatSDK.zip"
# "deployment/custom-resource-helper.zip"
+ "deployment/start-chat-contact.zip" # UPDATE one at a time
)

export REGIONS_TO_UPDATE=(
"us-west-2"
"us-east-1"
"ap-southeast-2"
"ap-northeast-1"
"eu-central-1"
"eu-west-2"
"ap-southeast-1"
"ca-central-1"
"ap-northeast-2"
# "af-south-1" # TODO
)
```

3. Run `syncScript.sh` to make sure you have WRITE access to the buckets

```sh
sudo chmod +x ./syncScript.sh
./syncScript.sh
```

4. Run `deployScript.sh` to upload the desired files!

```sh
sudo chmod +x ./deployScript.sh
./deployScript.sh
```

## `startChatContactAPI` S3 Assets

- Bucket name: `<region>..start-chat-contact-proxy-cfn`
- Source: [startChatContactAPI](https://github.com/amazon-connect/amazon-connect-chat-ui-examples/tree/master/cloudformationTemplates/startChatContactAPI)

```
cloudformation.yaml
deployment/
- ChatSDK.zip
- custom-resource-helper.zip
- start-chat-contact.zip
```

## `urlPreviewForAsync` S3 Assets

- Bucket name: `<region>.amazon-connect-url-preview-cfn`
- Source: [urlPreviewForAsyncChat](https://github.com/amazon-connect/amazon-connect-chat-ui-examples/tree/master/cloudformationTemplates/urlPreviewForAsyncChat)

```
cloudformation.yaml
deployment/
- contact-flows/Basic Chat Disconnect Flow
- contact-flows/Basic-Chat
- css/styles.css
- js/amazon-connect-chat-interface.js
- ChatSDK.zip
- create-website.zip
- custom-resource-helper.zip
- favicon.ico
- s3-notification-lambda.zip
- start-chat-contact.zip
- update-chat-dbb
- urlPreviewFunction.zip
- urlPreviewLayer.zip
```
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export SKIP_AUTHENTICATE="false" # default: false

export ACCOUNT_ID="<accountId>"
export CONSOLE_ROLE_NAME="<consoleRole>"
export CONSOLE_ROLE_NAME="<consoleRole>" # Admin

export REGIONS_TO_UPDATE=(
"us-west-2"
Expand All @@ -12,11 +12,13 @@ export REGIONS_TO_UPDATE=(
"eu-west-2"
"ap-southeast-1"
"ca-central-1"
"ap-northeast-2"
# "af-south-1" # TODO
)

# startChatContactAPI
export LOCAL_BUCKET_FOLDER="startChatContactAPI"
export BUCKET_TO_UPDATE="start-chat-contact-api-cfn"
export BUCKET_TO_UPDATE="start-chat-contact-proxy-cfn"
export FILES_TO_UPLOAD=(
# "cloudformation.yaml"
# "deployment/ChatSDK.zip"
Expand All @@ -26,12 +28,12 @@ export FILES_TO_UPLOAD=(

# urlPreviewForAsyncChat
# export LOCAL_BUCKET_FOLDER="urlPreviewForAsyncChat"
# export BUCKET_TO_UPDATE="amazon-connect-advanced-customer-chat-cfn"
# export BUCKET_TO_UPDATE="amazon-connect-url-preview-cfn"
# export FILES_TO_UPLOAD=(
# "cloudformation.yaml"
# "deployment/contact-flows/Basic Chat Disconnect Flow"
# "deployment/contact-flows/Basic-Chat"
# "deployment/css/styles.css"
# "deployment/css/style.css"
# "deployment/js/amazon-connect-chat-interface.js"
# "deployment/ChatSDK.zip"
# "deployment/create-website.zip"
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 9a0e21c

Please sign in to comment.