Skip to content

Commit

Permalink
Merge branch 'develop' v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrahan committed Jan 11, 2024
2 parents a243755 + b110db0 commit ba87655
Show file tree
Hide file tree
Showing 20 changed files with 718 additions and 4,737 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ dist
cdk-outputs.json
environment.json*
slack-manifest-output.json
build
build
awsrelease.sh
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.2] - 2023-01-11
### Fixed
- Prebuild CloudFormation template region parameter default now matches template region for us-west-2
- Merged #21 - Remove SDK JSON model injection in favor of @aws-sdk/client-qbusiness
- Merged dependabot #22 - Bump follow-redirects from 1.15.3 to 1.15.4

## [0.1.1] - 2023-12-04
### Added
- New 'Easy Button' option for deployment and update using pre-built CloudFormation templates (with no dependency on dev shell, cdk, etc.) - see [README - Deploy the stack](./README.md#1-deploy-the-stack).
Expand All @@ -24,6 +30,7 @@ Initial release
- Process up to 5 attached files for document question answering, summaries, etc.
- Reset and start new conversation in DM channel by using `/new_conversation`

[Unreleased]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/compare/v0.1.1...develop
[Unreleased]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/compare/v0.1.2...develop
[0.1.2]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/releases/tag/v0.1.2
[0.1.1]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/releases/tag/v0.1.1
[0.1.0]: https://github.com/aws-samples/qnabot-on-aws-plugin-samples/releases/tag/v0.1.0
6 changes: 4 additions & 2 deletions bin/convert-cfn-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ function updateTemplateLambdaRolePermissions(template, lambdas) {
}

function parameterizeTemplate(template, lambdas) {
const allowedQRegions = ['us-east-1', 'us-west-2'];
const defaultQRegion = allowedQRegions.includes(awsRegion) ? awsRegion : allowedQRegions[0];
template.Parameters = {
AmazonQUserId: {
Type: 'String',
Expand All @@ -201,8 +203,8 @@ function parameterizeTemplate(template, lambdas) {
},
AmazonQRegion: {
Type: 'String',
Default: 'us-east-1',
AllowedValues: ['us-east-1', 'us-west-2'],
Default: defaultQRegion,
AllowedValues: allowedQRegions,
Description: 'Amazon Q Region'
},
ContextDaysToLive: {
Expand Down
2 changes: 0 additions & 2 deletions bin/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ stack_name=$(prompt_for_value "StackName" "Name for slack bot" "AmazonQBot" "^[A
user_id=$(prompt_for_value "AmazonQUserId" "Amazon Q User ID (leave empty to use slack users' email as user Id)" "" "^[^[:space:]]{0,255}$")
app_id=$(prompt_for_value "AmazonQAppId" "Amazon Q Application ID (copy from AWS console)" "none" "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$")
region=$(prompt_for_value "AmazonQRegion" "Amazon Q Region" $(aws configure get region) "^[a-z]{2}-[a-z]+-[0-9]+$")
endpoint=$(prompt_for_value "AmazonQEndpoint" "Amazon Q Endpoint (leave empty for default endpoint)" "" "https://[-[:alnum:]\+&@#/%?=~_|!:,.;]+")
ttl_days=$(prompt_for_value "ContextDaysToLive" "Number of days to keep conversation context" "90" "^[1-9][0-9]{0,3}$")

# Create or update the JSON file
Expand All @@ -72,7 +71,6 @@ jq -n \
AmazonQAppId: $app_id,
AmazonQUserId: $user_id,
AmazonQRegion: $region,
AmazonQEndpoint: $endpoint,
ContextDaysToLive: $ttl_days
}' > "$json_file"

Expand Down
1 change: 0 additions & 1 deletion bin/my-amazon-q-slack-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface StackEnvironment {
AmazonQAppId: string;
AmazonQUserId: string;
AmazonQRegion: string;
AmazonQEndpoint?: string;
ContextDaysToLive: string;
}

Expand Down
1 change: 0 additions & 1 deletion lib/my-amazon-q-slack-bot-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export class MyAmazonQSlackBotStack extends cdk.Stack {
timeout: Duration.seconds(30),
environment: {
SLACK_SECRET_NAME: slackSecret.secretName,
AMAZON_Q_ENDPOINT: env.AmazonQEndpoint ?? '',
AMAZON_Q_REGION: env.AmazonQRegion,
AMAZON_Q_APP_ID: env.AmazonQAppId,
AMAZON_Q_USER_ID: env.AmazonQUserId ?? '',
Expand Down
Loading

0 comments on commit ba87655

Please sign in to comment.