To set up trace and log rehydration from your Amazon S3 bucket, you’ll need to create an AWS IAM role with:
You can use Terraform or the AWS Management Console to create the necessary AWS resources. After you’ve created the IAM policy and role, you’ll need to contact your Honeycomb account team to finish setting up your S3 archive.
First, create an IAM policy with permissions for listing and retrieving objects from your Amazon S3 bucket:
data "aws_iam_policy_document" "s3_bucket_access" {
statement {
effect = "Allow"
actions = [
"s3:GetObject",
"s3:ListBucket",
"s3:GetBucketLocation"
]
resources = [
your_s3_bucket_arn,
"${your_s3_bucket_arn}/*"
]
}
}
resource "aws_iam_policy" "s3_bucket_access" {
name = "${var.env}_s3_bucket_access"
policy = data.aws_iam_policy_document.s3_bucket_access.json
}
Next, create an IAM role with permission to access your Amazon S3 bucket and give Honeycomb permission to use this role when interacting with your Amazon S3 bucket:
data "aws_iam_policy_document" "hny_assume_role_policy" {
statement {
effect = "Allow"
actions = [
"sts:AssumeRole"
]
principals {
type = "AWS"
identifiers = [honeycomb_role_arn]
}
}
}
resource "aws_iam_role" "hny_s3_bucket_access_role" {
name = "${var.env}-hny-s3-bucket-access-role"
assume_role_policy = data.aws_iam_policy_document.hny_assume_role_policy.json
}
Replace honeycomb_role_arn
in the above example with one of the following ARN values:
For Production US teams:
"arn:aws:iam::702835727665:role/production-eks-bulk-ingest-role"
For Production EU teams:
"arn:aws:iam::919259170365:role/production-eu1-eks-bulk-ingest-role"
Attach the "s3_bucket_access"
policy you created to your new IAM role:
resource "aws_iam_role_policy_attachment" "s3_bucket_access" {
role = aws_iam_role.s3_bucket_access_role.name
policy_arn = aws_iam_policy.s3_bucket_access.arn
}
To complete your setup, share the following information with your Honeycomb account team:
s3_prefix
from your OpenTelemetry Collector exporter configuration, if specified.s3_partition_format
from your OpenTelemetry Collector exporter configuration, if specified.