Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When making AWS EC2 API calls to GetTransitGatewayRouteTablePropagations, LocalStack returns a 500 (InternalError) response. The logs show a Python error: "exception during call chain: 'list' object has no attribute 'get'". This happens consistently for this specific Transit Gateway API call, while other related calls like DescribeTransitGateways and GetTransitGatewayRouteTableAssociations work correctly (returning 200).
2025-03-05T17:43:41.023 INFO --- [et.reactor-7] localstack.request.aws : AWS ec2.DescribeTransitGatewayVpcAttachments => 200
2025-03-05T17:43:41.038 INFO --- [et.reactor-3] localstack.request.aws : AWS ec2.DescribeTransitGateways => 200
2025-03-05T17:43:41.052 INFO --- [et.reactor-2] localstack.request.aws : AWS ec2.GetTransitGatewayRouteTableAssociations => 200
2025-03-05T17:43:41.063 ERROR --- [et.reactor-1] l.aws.handlers.logging : exception during call chain: 'list' object has no attribute 'get'
2025-03-05T17:43:41.064 INFO --- [et.reactor-1] localstack.request.aws : AWS ec2.GetTransitGatewayRouteTablePropagations => 500 (InternalError)
2025-03-05T17:43:41.179 ERROR --- [et.reactor-4] l.aws.handlers.logging : exception during call chain: 'list' object has no attribute 'get'
2025-03-05T17:43:41.181 INFO --- [et.reactor-4] localstack.request.aws : AWS ec2.GetTransitGatewayRouteTablePropagations => 500 (InternalError)
2025-03-05T17:43:41.427 ERROR --- [et.reactor-6] l.aws.handlers.logging : exception during call chain: 'list' object has no attribute 'get'
2025-03-05T17:43:41.429 INFO --- [et.reactor-6] localstack.request.aws : AWS ec2.GetTransitGatewayRouteTablePropagations => 500 (InternalError)
Expected Behavior
The GetTransitGatewayRouteTablePropagations API call should return a 200 response with proper information about Transit Gateway route table propagations, similar to how GetTransitGatewayRouteTableAssociations currently works. No internal errors should occur during this API call.
How are you starting LocalStack?
With the localstack
script
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack
command, arguments, or docker-compose.yml
)
localstack start
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
Trying to replicate these commands in awslocal do not replicate the error. We are using Crossplane but you can create a simliar scenario with Terraform:
provider "aws" {
region = "us-east-1"
access_key = "test"
secret_key = "test"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
endpoints {
ec2 = "http://localhost:4566"
}
}
# Create Transit Gateway
resource "aws_ec2_transit_gateway" "test" {
description = "Test Transit Gateway"
default_route_table_association = "enable"
default_route_table_propagation = "enable"
}
# Create Transit Gateway Route Table
resource "aws_ec2_transit_gateway_route_table" "test" {
transit_gateway_id = aws_ec2_transit_gateway.test.id
}
# Create VPC
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
# Create Subnet
resource "aws_subnet" "test" {
vpc_id = aws_vpc.test.id
cidr_block = "10.0.1.0/24"
}
# Create Transit Gateway Attachment
resource "aws_ec2_transit_gateway_vpc_attachment" "test" {
subnet_ids = [aws_subnet.test.id]
transit_gateway_id = aws_ec2_transit_gateway.test.id
vpc_id = aws_vpc.test.id
}
# Associate the attachment with the route table
resource "aws_ec2_transit_gateway_route_table_association" "test" {
transit_gateway_attachment_id = aws_ec2_transit_gateway_vpc_attachment.test.id
transit_gateway_route_table_id = aws_ec2_transit_gateway_route_table.test.id
}
# Create a route propagation
resource "aws_ec2_transit_gateway_route_table_propagation" "test" {
transit_gateway_attachment_id = aws_ec2_transit_gateway_vpc_attachment.test.id
transit_gateway_route_table_id = aws_ec2_transit_gateway_route_table.test.id
}
output "transit_gateway_id" {
value = aws_ec2_transit_gateway.test.id
}
output "route_table_id" {
value = aws_ec2_transit_gateway_route_table.test.id
}
Run with:
terraform init
terraform apply -auto-approve
Environment
- OS: Ubuntu 22.04
- LocalStack:
LocalStack version: 4.2.1.dev20
LocalStack Docker image sha: fa06805e1e4e54428c4b10f6a6044027839da608fd34fb74b2438954175807eb
LocalStack build date: 2025-03-05
LocalStack build git hash: d353d687a
Anything else?
No response