Skip to content

Commit 0013d14

Browse files
committed
apigw-bedrock-nova-canvas: terraform fmt
1 parent 07e344d commit 0013d14

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

apigw-bedrock-nova-canvas/main.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ resource "random_string" "suffix" {
1515

1616
# Create Lambda layer for Pillow from provided zip file
1717
resource "aws_lambda_layer_version" "pillow_layer" {
18-
filename = "pillow.zip" # Make sure this zip file exists in your terraform directory
19-
layer_name = "pillow_layer"
18+
filename = "pillow.zip" # Make sure this zip file exists in your terraform directory
19+
layer_name = "pillow_layer"
2020
compatible_runtimes = ["python3.11"]
21-
description = "Pillow library layer for image processing"
21+
description = "Pillow library layer for image processing"
2222
}
2323

2424
# IAM Policy for invoking Bedrock model
@@ -45,23 +45,23 @@ resource "aws_iam_policy" "invoke_model_policy" {
4545

4646
# S3 bucket for storing images
4747
resource "aws_s3_bucket" "image_bucket" {
48-
bucket = "${lower(var.prefix)}-image-bucket-${random_string.suffix.result}"
48+
bucket = "${lower(var.prefix)}-image-bucket-${random_string.suffix.result}"
4949
force_destroy = true
5050
}
5151

5252
# Create CloudWatch Log Group for Lambda
5353
resource "aws_cloudwatch_log_group" "lambda_log_group" {
5454
name = "/aws/lambda/${lower(var.prefix)}-invoke-bedrock"
5555
retention_in_days = 14
56-
56+
5757
lifecycle {
5858
prevent_destroy = false
5959
}
6060
}
6161

6262
# Lambda function
6363
resource "aws_lambda_function" "invoke_bedrock_function" {
64-
filename = "index.zip" # Replace with your Lambda code zip file
64+
filename = "index.zip" # Replace with your Lambda code zip file
6565
function_name = "${lower(var.prefix)}-invoke-bedrock"
6666
role = aws_iam_role.lambda_role.arn
6767
handler = "index.handler"
@@ -146,7 +146,7 @@ resource "aws_api_gateway_integration" "lambda_integration" {
146146
# API Gateway Deployment
147147
resource "aws_api_gateway_deployment" "api_deployment" {
148148
rest_api_id = aws_api_gateway_rest_api.bedrock_api.id
149-
149+
150150
depends_on = [
151151
aws_api_gateway_integration.lambda_integration
152152
]
@@ -176,12 +176,12 @@ output "lambda_function" {
176176

177177
output "api_endpoint" {
178178
description = "The API Gateway endpoint URL "
179-
value = "${aws_api_gateway_stage.api_stage.invoke_url}/image_gen"
179+
value = "${aws_api_gateway_stage.api_stage.invoke_url}/image_gen"
180180
}
181181

182182
output "s3_image_bucket" {
183183
description = "The Output S3 bucket is "
184-
value = aws_s3_bucket.image_bucket.id
184+
value = aws_s3_bucket.image_bucket.id
185185
}
186186

187187
# Data source for current region

0 commit comments

Comments
 (0)