https://github.com/cloudacademy/terraform-module-aws-bedrock-logs
https://github.com/cloudacademy/terraform-module-aws-bedrock-logs
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cloudacademy/terraform-module-aws-bedrock-logs
- Owner: cloudacademy
- Created: 2024-09-06T18:35:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-06T19:18:40.000Z (almost 2 years ago)
- Last Synced: 2025-10-07T01:32:00.069Z (9 months ago)
- Language: HCL
- Size: 1000 Bytes
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Amazon Bedrock Logs Terraform Module
A Terraform module for creating an Amazon Bedrock CloudWatch Log group. The log group is created to store invocation logs from Amazon Bedrock. The module creates a Lambda function that performs the `PutModelInvocationLoggingConfiguration` API call to enable logging for Bedrock. The logs are used to indicate whether an Amazon Bedrock model has been invoked for validation check functions in labs.
See the [variables.tf](variables.tf) file for configurable options.
## Testing locally
Defaults are set for all variables in the module. To override the defaults, create a `vars.tfvars` file with the variable names and updated values found in the `variables.tf` file.
Then run the following commands:
```bash
terraform init
terraform plan
terraform apply -auto-approve
```
Logs will appear once an enabled Amazon Bedrock model is invoked. The logs will be stored in the CloudWatch log group created by the module ('/aws/bedrock/logs').
To destroy the instance, run:
```bash
terraform destroy -auto-approve
```
## Usage
To use in a lab Terraform configuration, add the following code to your template:
```hcl
module aws_bedrock_logs {
source = "github.com/cloudacademy/terraform-module-aws-bedrock-logs"
}
```