Hey guys, I have a friend that is trying to share to me his S3 Bucket so we can work together on some data, the issue is, how do I connect to a bucket that is not in my account/ogranization?
For context, I have a personal account, and he sent me a string with 60 characters saying “this is an access to the resource”, now how can I connect to it so I could import the data in Python?
Most common method I’ve seen is have your friend issue an iam user with a read only policy for the bucket. And then they send you the access key and secret key via email .
How does an IAM user look like?
do I need a username and password, or is it just a signle value that is enough to authenticate and use the shared resource?
He didnt give me that, just a long string, does that mean I should use my own access and secret key? cause I just created an AWS account and I only have an email and password, I didnt get any access/secret key
For context I’m a total noob so I have no idea what is an IAM or whathever and where I get the secret and access key, and help would be gladly apprecciated, thanks
Whoever is hosting the bucket would make an IAM user on their end, and attach to it a policy that allows that user to read/write to the specified s3 bucket . They also generate an s3 access key and secret key that they give to you.
Then you can use that pair of credentials to read and write to that bucket using an s3 client.
If you’re using python you can use boto3 or AWS cli if you want to use command line. All s3 tools require an s3 access key and secret key and the bucket name.
The AWS Security Token Service (STS) is a service that enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users).
I though this myself originally but then it (assuming a role) assumes something about the recipient (the person accessing the files). I.e. they have an AWS account that can assume the role which means the person making the bucket needs to know something from that person (their AWS account, for example, something traceable to an individual).
With S3 access/secret keys, the person issuing them doesn’t have to know anything about the person using them. Which I imagine IS the security issue. But (like IAM roles) they can certainly revoke the access if something is awry.
Depends on the trust relationship in the role to be assumed. Given OP has their own AWS account, binding the trust relationship to this account is straight forward.
However, trust relationships are not limited to other AWS account/roles. You can restrict them to identity providers and many more things too.
Mate before you do anything please set up MFA for your account and a billing alarm. Otherwise in a few months you’ll be back here complaining you have a bill for thousands of dollars.