Skip to content

[BUG] Firehose DeliveryStreamARN uses the emulator default region, not the request region #2658

Description

@tippmar-nr

Service

Data Firehose

AWS API Action

CreateDeliveryStream, DescribeDeliveryStream

Expected behavior

DeliveryStreamARN should carry the region of the request, the way every other service does.

Actual behavior

Firehose builds the ARN from the emulator-wide default region and ignores the per-request signing region. Other services in the same emulator, in the same session, use the request region correctly:

requested eu-west-1       firehose: arn:aws:firehose:us-east-1:000000000000:deliverystream/f-eu-west-1
                          kinesis:  arn:aws:kinesis:eu-west-1:000000000000:stream/k-eu-west-1
                          sns:      arn:aws:sns:eu-west-1:000000000000:t-eu-west-1
                          dynamodb: arn:aws:dynamodb:eu-west-1:000000000000:table/d-eu-west-1

requested us-west-2       firehose: arn:aws:firehose:us-east-1:...     (others: us-west-2)
requested ap-southeast-2  firehose: arn:aws:firehose:us-east-1:...     (others: ap-southeast-2)

DescribeDeliveryStream returns the same wrong ARN, so the value is stored wrong at create time rather than rendered wrong on read.

Setting FLOCI_REGION confirms the source. With FLOCI_REGION=eu-central-1 and a us-west-2 request:

firehose : arn:aws:firehose:eu-central-1:000000000000:deliverystream/rf   <- follows FLOCI_REGION
kinesis  : arn:aws:kinesis:us-west-2:000000000000:stream/rk               <- follows the request

Reproduction

docker run -d --name floci -p 4566:4566 floci/floci:1.7.0

export AWS_ENDPOINT_URL=http://localhost:4566
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test

aws s3 mb s3://bugbucket --region us-east-1

for R in eu-west-1 us-west-2 ap-southeast-2; do
  echo "requested: $R"
  aws kinesis create-stream --region $R --stream-name "k-$R" --shard-count 1
  aws kinesis describe-stream-summary --region $R --stream-name "k-$R" \
    --query 'StreamDescriptionSummary.StreamARN' --output text
  aws firehose create-delivery-stream --region $R \
    --delivery-stream-name "f-$R" --delivery-stream-type DirectPut \
    --s3-destination-configuration "RoleARN=arn:aws:iam::000000000000:role/r,BucketARN=arn:aws:s3:::bugbucket" \
    --query 'DeliveryStreamARN' --output text
done

Kinesis prints the requested region on every iteration. Firehose prints us-east-1 on every iteration.

Environment

  • Floci version / image tag: floci/floci:1.7.0 (sha256:bec9b9f749322444a57fb0f00d3e007ffd49015162361aab84ccecd9b4f5f8ed)
  • Reproduced with AWS CLI v2.34.19 and AWS SDK for .NET v4 (AWSSDK.KinesisFirehose 4.0.100.8)
  • How you're running Floci: Docker, no extra configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfirehoseAmazon Data Firehose

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions