Skip to content

Create the bucket

Progress checklist

The destination must be a general purpose S3 bucket in the same Region as the stream. Cross-account delivery is supported; cross-Region is not. A dead-letter queue is optional — if you omit it, failed records default to the destination bucket under an error prefix.

  1. Create the bucket in the lab Region and tag it.

    Reuse the same LAB_SUFFIX as the stream (or let the shell generate one if you start here).

    Terminal window
    export AWS_PROFILE=sandbox
    export AWS_REGION=ap-southeast-2
    export LAB_SUFFIX=${LAB_SUFFIX:-$(date +%Y%m%d%H%M%S)}
    export ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
    export BUCKET_NAME="kds-s3-demo-${LAB_SUFFIX}-${ACCOUNT_ID}"
    aws s3api create-bucket \
    --bucket "$BUCKET_NAME" \
    --create-bucket-configuration "LocationConstraint=${AWS_REGION}"
    aws s3api put-bucket-tagging \
    --bucket "$BUCKET_NAME" \
    --tagging 'TagSet=[{Key=Project,Value=kinesis-s3-delivery-walkthrough}]'

    Looks like (verified in ap-southeast-2, CLI 2.36.38 — tagging returns no body):

    {
    "Location": "<bucket endpoint for LAB_SUFFIX / ACCOUNT_ID>",
    "BucketArn": "arn:aws:s3:::kds-s3-demo-LAB_SUFFIX-ACCOUNT_ID"
    }

    ./scripts/demo.sh up creates this bucket as part of the full stack (same LAB_SUFFIX naming).

  2. Note the bucket ARN for the channel configuration.

    Terminal window
    echo "arn:aws:s3:::${BUCKET_NAME}"

    Looks like:

    arn:aws:s3:::kds-s3-demo-LAB_SUFFIX-ACCOUNT_ID
Terminal window
aws s3api get-bucket-location --bucket "$BUCKET_NAME"
aws s3api get-bucket-tagging --bucket "$BUCKET_NAME"

Looks like:

{
"LocationConstraint": "ap-southeast-2"
}
{
"TagSet": [
{
"Key": "Project",
"Value": "kinesis-s3-delivery-walkthrough"
}
]
}
CheckExpect
Locationlab Region (ap-southeast-2 by default)
TagProject=kinesis-s3-delivery-walkthrough