-
Notifications
You must be signed in to change notification settings - Fork 5
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
V0.0.1 #3
V0.0.1 #3
Changes from all commits
34f4c80
b807990
c4ff5ee
a571d12
2d7566b
80d17ba
e2e0370
853231f
bc11cf4
5895da4
fa15e74
cd1e1eb
5ee00a3
73ae098
6aa3a5e
09693d7
4b847b1
9bf3da0
fde18d8
ca52d42
2ffb7da
c9a6507
674f583
af467b8
8861d98
1308988
face31a
bd4f014
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,19 @@ Integrate Amazon Bedrock to your HashiCorp Cloud Platform Terraform (Terraform C | |
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to include the term Agentic here because we're using that on our landing pages |
||
### Terraform plan summary | ||
|
||
Summarize Terraform plan output in human friendly natural language. | ||
 | ||
|
||
### Function calling (AMI analysis) | ||
|
||
Use function calling to execute other tools, such as analyzing AMI data. | ||
 | ||
|
||
### Responsible AI | ||
|
||
Implement safeguards using Amazon Bedrock guardrails customized to your organization requirements and responsible AI policies | ||
 | ||
|
||
## Architecture | ||
|
||
 | ||
|
@@ -29,6 +36,7 @@ Please refer to the [best-practice](#best-practice) section below for more detai | |
To use this module you need have the following: | ||
|
||
1. AWS account and credentials | ||
1. Amazon Bedrock model access (default model is `Claude 3 Sonnet`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also mention, lamdba, cloudfront and WAF access as well? |
||
1. HCP Terraform account | ||
|
||
## Usage | ||
|
@@ -39,6 +47,8 @@ To use this module you need have the following: | |
make all | ||
``` | ||
|
||
* Enable Bedrock model access for `Claude 3 Sonnet`. Refer to [this guide for more info](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html). | ||
|
||
* Reference the `examples/basic` folder on how to use this module | ||
|
||
```sh | ||
|
@@ -57,3 +67,5 @@ To use this module you need have the following: | |
* Enable the AWS WAF setup by setting variable `deploy_waf` to `true` (additional cost will apply). This will add WAF protection to the Run Tasks URL endpoint. | ||
|
||
* We recommend you to setup additional CloudWatch alarm to monitor Lambda concurrency and WAF rules. | ||
|
||
* We recommend to add additional topic to the Bedrock Guardrail to fit your organization requirements. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.0.0 | ||
v0.0.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
resource "awscc_bedrock_guardrail" "runtask_fulfillment" { | ||
name = "${local.solution_prefix}-guardrail" | ||
blocked_input_messaging = "Unfortunately we are unable to provide response for this input" | ||
blocked_outputs_messaging = "Unfortunately we are unable to provide response for this input" | ||
description = "Basic Bedrock Guardrail for sensitive info exfiltration" | ||
|
||
# detect and filter harmful user inputs and FM-generated outputs | ||
content_policy_config = { | ||
filters_config = [ | ||
{ | ||
input_strength = "HIGH" | ||
output_strength = "HIGH" | ||
type = "SEXUAL" | ||
}, | ||
{ | ||
input_strength = "HIGH" | ||
output_strength = "HIGH" | ||
type = "VIOLENCE" | ||
}, | ||
{ | ||
input_strength = "HIGH" | ||
output_strength = "HIGH" | ||
type = "HATE" | ||
}, | ||
{ | ||
input_strength = "HIGH" | ||
output_strength = "HIGH" | ||
type = "INSULTS" | ||
}, | ||
{ | ||
input_strength = "HIGH" | ||
output_strength = "HIGH" | ||
type = "MISCONDUCT" | ||
}, | ||
{ | ||
input_strength = "NONE" | ||
output_strength = "NONE" | ||
type = "PROMPT_ATTACK" | ||
} | ||
] | ||
} | ||
|
||
# block / mask potential PII information | ||
sensitive_information_policy_config = { | ||
pii_entities_config = [ | ||
{ | ||
action = "BLOCK" | ||
type = "DRIVER_ID" | ||
}, | ||
{ | ||
action = "BLOCK" | ||
type = "PASSWORD" | ||
}, | ||
{ | ||
action = "ANONYMIZE" | ||
type = "EMAIL" | ||
}, | ||
{ | ||
action = "ANONYMIZE" | ||
type = "USERNAME" | ||
}, | ||
{ | ||
action = "BLOCK" | ||
type = "AWS_ACCESS_KEY" | ||
}, | ||
{ | ||
action = "BLOCK" | ||
type = "AWS_SECRET_KEY" | ||
}, | ||
] | ||
} | ||
|
||
# block select word / profanity | ||
word_policy_config = { | ||
managed_word_lists_config = [{ | ||
type = "PROFANITY" | ||
}] | ||
} | ||
|
||
tags = [for k, v in local.combined_tags : | ||
{ | ||
key : k, | ||
value : v | ||
} | ||
] | ||
|
||
} | ||
|
||
resource "awscc_bedrock_guardrail_version" "runtask_fulfillment" { | ||
guardrail_identifier = awscc_bedrock_guardrail.runtask_fulfillment.guardrail_id | ||
description = "Initial version" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run task Terrraform plan analyzer