0

I'm integrating aws firehouse with API gateway post call.

I know here the issue is with the uri.

My Terraform code looks like this.

resource "aws_api_gateway_integration" "request_method_integration_post" {

rest_api_id = local.rest_api_id
resource_id = local.resource_id
http_method = aws_api_gateway_method.request_method_post.http_method
type        = "AWS"
integration_http_method = "POST"
uri = 
"arn:aws:apigateway:${local.region_name}:firehose:arn:aws:firehose:${local.region_name}:${var.accountId}:deliverystream/${var.firehose_name}/PutRecord"
}

According to the documentation uri should have the below pattern

arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}

reference : https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_integration

But I cannot figure out the correct uri here.

If anyone knows please help.

I tried to change the uri with different formats.
I also tried with the following.
uri = "arn:aws:apigateway:${var.aws_region}:firehose:action/PutRecord"
Non works.

1
  • 1
    Please add the rest of the code to the question. Commented Dec 11, 2022 at 16:20

2 Answers 2

1

Looking at another post here

You should have the following values and format:

type = "AWS"
integration_http_method = "POST"
uri = "arn:aws:apigateway:${var.aws_region}:firehose:action/PutRecord"
Sign up to request clarification or add additional context in comments.

1 Comment

I also tried with the following. uri = "arn:aws:apigateway:${var.aws_region}:firehose:action/PutRecord" Still error remains same.
0

Found the answer.

uri should be as follow.

"arn:aws:apigateway:${local.region_name}:firehose:action/PutRecordBatch"

Also credentials was missing in my aws_api_gateway_integration resource. Should be look like,

credentials             = aws_iam_role.name.arn

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.