Need Help understanding the authentication to SQS

Hey guys,

after reading countless documentations to AWS and Data Prepper for a couple of days I’ve come to the conclusion that I don’t understand how the authentication to the SQS Queue for log ingestion out of S3 works.

As far as I understand, I have to create an IAM Role that has access to the SQS queue that I created, and I call that queue via the “sts_role_arn” parameter in the pipeline.yaml

But the IAM Role needs a principal that dictates who can assume this role. So somehow Data Prepper has to authenticate to the IAM Role if I’m correct.

I found this GitHub issue where an access_key_id and a secret_key_id are mentioned, which at least could be used to authenticate to an IAM Account, but it seems that these parameters don’t exist anymore or never existed in the first place?

I hope someone can tell me what I’m missing here :slight_smile:

Cheers guys!
Patrick

Hello Patrick.

As far as I understand, I have to create an IAM Role that has access to the SQS queue that I created, and I call that queue via the “sts_role_arn” parameter in the pipeline.yaml

This is not entirely accurate. You can provide an IAM role. If you do not set the sts_role_arn property, then Data Prepper will use the default AWS credential provider chain.

If you are running Data Prepper and already have AWS credentials in place with the necessary SQS/S3 permissions, then you can omit the role.

But the IAM Role needs a principal that dictates who can assume this role. So somehow Data Prepper has to authenticate to the IAM Role if I’m correct.

If you use an IAM Role, you need to specify a trust principal. This is who can assume the role. The value you specify here depends on how you are using Data Prepper. If you are using it in the same account, you can configure the the trust principal to be your account. Other scenarios may be more complicated and are really dictated by how IAM works. This documentation may help.

One last thing - you need to have permissions to sts:AssumeRole on the desired role. The trust principal is not enough. The permissions that Data Prepper is running with will need to have these permissions.

I hope this helps. Please let us know how we can help next.

David

1 Like