Hi there, I could not connect rudder stack to S3 u...
# support
a
Hi there, I could not connect rudder stack to S3 using
Copy code
arn:aws:iam::422074288268:user/s3-copy
but I could not attached it to my S3 bucket and getting this error
Invalid principal in policy
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
q
Hi @ambitious-diamond-50119 Can you check if necessary IAM policy is created and granted permissions. Here is a doc for your reference https://www.rudderstack.com/docs/destinations/aws-iam-role-for-rudderstack/
a
I followed this and used option 2
Option 2: Allow RudderStack user to write into the bucket
but it doesn't work and giving me that principal is invalid
q
Are you using Rudderstack cloud or self-hosting it?
a
yes cloud
I think setting policy inside s3 bucket is old right?
q
can you check the bucket name where you want to write
Copy code
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::422074288268:user/s3-copy"
      },
      "Action": [
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": [
        "arn:aws:s3:::YOUR_BUCKET_NAME/*"
      ]
    }
  ]
}
a
yes I followed it and S3 policy is not getting added
I created a role but it events are failed can I specify bucket s3 region
@quiet-wolf-72320
It is clear that role authentication is not working I changed to iam user and it worked
I need to use role based authentication
Please help me
q
@ambitious-diamond-50119 can you share your s3 configuration screenshot. Can you check if below setting is enabled for role-based authentication?
a
when I enable role based authentication it did not work
image.png
q
what is the state of AWS Glue setting? enabled or disabled?
In your screenshot, IAM Role ARN is blank?
a
Glue? role is blank because I don't want to share it
there is no mention for Glue in any place
q
ok
a
I am using AWS S3
q
There is something wrong, the logo for your destination in your workspace is showing as S3 Data lake Can you give it a try and create another destination AWS S3 and see if there is any difference?
a
I did every thing required but still couldn't authorize your user
arn:aws:iam::422074288268:user/s3-copy
to assume my account's role
does this user have access to assume my role? because this the only thing I am not sure of
b
S3 Copy User and IAM Role Authentication are 2 different options, they don't work together. S3 copy user is something you would use when you don't want to specify neither role or access keys. For IAM Role authentication: refer this doc
a
I already did this. The problem is that you need to give user a permission to assume the role. Which in this case s3-copy user must have a permission to assume my role so it's possible for it to write to my S3 bucket. Plus, in this link it mentioned specifically what I am talking about so these two things are very related.
hello any update?
b
@ambitious-diamond-50119 Sorry for the late response I got occupied with other projects and missed checking your response, can we get into a call? I want to check your AWS IAM role trust policy once? Let me know what time works for you.
a
Hey @bland-smartphone-16365 I am available tell me when you are
b
@ambitious-diamond-50119 https://calendly.com/dilipkola Please block time on my calender
a
done
👍 1