resource "aws_api_gateway_integration" "kinesis_integration" {
rest_api_id = aws_api_gateway_rest_api.shippeo_api_kinesis.id
resource_id = aws_api_gateway_resource.shippeo_api_resource_kinesis.id
http_method = aws_api_gateway_method.post_json_files_kinesis.http_method
type = "AWS_PROXY"
uri = aws_kinesis_stream.shippeo-kinesis-stream.arn
integration_http_method = "POST"
depends_on = [
aws_api_gateway_resource.shippeo_api_resource_kinesis
]
}
I want to create an API Gateway that sends data to a kinesis stream. I am trying the code above but I get this error:
Error creating API Gateway Integration: BadRequestException: AWS ARN for integration must contain path or action
│
│ with module.shippeo-api.aws_api_gateway_integration.kinesis_integration,
│ on ../../modules/shippeo/kinesis-api.tf line 62, in resource "aws_api_gateway_integration" "kinesis_integration":
│ 62: resource "aws_api_gateway_integration" "kinesis_integration" {
I read in another SO answer that the format of the uri is supposed to be like this:
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
How can I change it to use it with kinesis? What is the action or service_api?
region = "eu-central-1"