Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-organize the CFN template deployment documentation #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-ddb
- urlPreviewFunction.zip
- urlPreviewLayer.zip
```
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,20 +28,20 @@ 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"
# "deployment/custom-resource-helper.zip"
# "deployment/favicon.ico"
# "deployment/s3-notification-lambda.zip"
# "deployment/start-chat-contact.zip"
# "deployment/update-chat-dbb"
# "deployment/update-chat-ddb"
# "deployment/urlPreviewFunction.zip"
# "deployment/urlPreviewLayer.zip"
# )