-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changed - With the release of [AWS-Solutions-Constructs v2.65.0](https://github.com/awslabs/aws-solutions-constructs/tree/main/source/patterns/%40aws-solutions-constructs/aws-apigatewayv2websocket-sqs), the AWS ApiGateway websocket integration with Amazon SQS Queue is available in the library. Hence the implementation has been updated to use this construct. ### Fixed - Issue [#131](#131) which caused an issue with rendering non-S3 source URLs from vector store for a RAG based use case. - Issue [#132](#132) where configured Guardrails for Amazon Bedrock to have no effect on a use case's text input validations and output responses. - Wizard validation failure for SageMaker model selection type, that allowed user to navigate ahead even when the page had failed validations. - An AWS WAF rule that blocked larger payloads for HTTP POST request to the `/deployments` endpoint. This restricted configuring large system prompts (over 8 KB) for use case cases. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
Showing
95 changed files
with
1,949 additions
and
1,371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Reporting Security Issues | ||
---------------------------------------------------------------------------------------------------------- | ||
We take all security reports seriously. When we receive such reports, we will investigate and subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential security issue in this project, please notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [AWS Security](mailto:[email protected]). Please do not create a public GitHub issue in this project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/usr/bin/env node | ||
/********************************************************************************************************************** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * | ||
* * | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance * | ||
* with the License. A copy of the License is located at * | ||
* * | ||
* http://www.apache.org/licenses/LICENSE-2.0 * | ||
* * | ||
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES * | ||
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions * | ||
* and limitations under the License. * | ||
*********************************************************************************************************************/ | ||
|
||
import * as cdk from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
|
||
/** | ||
* Stack properties for nested stack | ||
*/ | ||
export abstract class BaseNestedStack extends cdk.NestedStack { | ||
/** | ||
* The custom resource lambda arn | ||
*/ | ||
public customResourceLambdaArn: string; | ||
|
||
/** | ||
* The custom resource lambda role arn | ||
*/ | ||
public customResourceLambdaRoleArn: string; | ||
|
||
/** | ||
* Access logging bucket to be associated with any S3 bucket creation | ||
*/ | ||
public readonly accessLoggingBucket: string; | ||
|
||
constructor(scope: Construct, id: string, props?: cdk.NestedStackProps) { | ||
super(scope, id, props); | ||
const stack = cdk.Stack.of(this); | ||
this.customResourceLambdaArn = new cdk.CfnParameter(stack, 'CustomResourceLambdaArn', { | ||
type: 'String', | ||
description: 'The custom resource lambda arn', | ||
allowedPattern: | ||
'^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$', | ||
constraintDescription: 'Please provide a valid lambda arn.' | ||
}).valueAsString; | ||
|
||
this.customResourceLambdaRoleArn = new cdk.CfnParameter(stack, 'CustomResourceRoleArn', { | ||
type: 'String', | ||
description: 'The custom resource lambda role arn', | ||
allowedPattern: '^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/[a-zA-Z_0-9+=,.@\\-_/]+$', | ||
constraintDescription: 'Please provide a valid lambda role arn.' | ||
}).valueAsString; | ||
|
||
this.accessLoggingBucket = new cdk.CfnParameter(stack, 'AccessLoggingBucketArn', { | ||
type: 'String', | ||
allowedPattern: '^arn:(aws|aws-cn|aws-us-gov):s3:::\\S+$', | ||
description: 'Arn of the S3 bucket to use for access logging.' | ||
}).valueAsString; | ||
} | ||
} | ||
|
||
export abstract class BaseUseCaseNestedStack extends BaseNestedStack { | ||
/** | ||
* Unique ID for this deployed use case within an application. Provided by the deployment platform if in use. | ||
*/ | ||
public readonly useCaseUUID: string; | ||
|
||
constructor(scope: Construct, id: string, props?: cdk.NestedStackProps) { | ||
super(scope, id, props); | ||
const stack = cdk.Stack.of(this); | ||
|
||
this.useCaseUUID = new cdk.CfnParameter(stack, 'UseCaseUUID', { | ||
type: 'String', | ||
description: | ||
'UUID to identify this deployed use case within an application. Please provide an 8 character long UUID. If you are editing the stack, do not modify the value (retain the value used during creating the stack). A different UUID when editing the stack will result in new AWS resource created and deleting the old ones', | ||
allowedPattern: '^[0-9a-fA-F]{8}$', | ||
maxLength: 8, | ||
constraintDescription: 'Please provide an 8 character long UUID' | ||
}).valueAsString; | ||
} | ||
} |
Oops, something went wrong.