Configure ec2 with iam role

I have an ubuntu EC2 in AWS with an IAM role that has rights to an S3 bucket.
I have installed rclone using install.sh and and it runs
when I run “rclone config” I get:
[xxx]
type = s3
provider = AWS
env_auth = true
access_key_id =
secret_access_key =
region = us-west-1
endpoint =
location_constraint = us-west-1
acl = private
server_side_encryption =
storage_class =

I am trying to use an IAM role attached to the EC2 to provide authentication to the S3

when I enter
rclone lsd remote:
I get
Failed to create file system for “remote:”: didn’t find section in config file

So I have either not installed correctly, or misunderstood something? or?

shouldnt the [xxx] equal remote? i’m new to rclone, but from what i have seen, its just an identifying label - ie it can be anything unique and meaningful to you

also, if you have an iam role that has rights to S3, you can use the aws cli to copy/sync data to s3 - you dont need rclone to do it (unless you want to).

I believe its the name of the bucket. I just anonymized it.

i am not sure about that - wouldn’t you write the command rclone copy xxx:mybucketname? xxx is your local label

I can’t use the copy command. The basic command “rclone lsd remote:” fails
The text you are reading is the contents of the config file. I assume I’ve got something misconfigured.

“AWS sync” works so I must have the IAM and S3 right.

then i think the command would be rclone lsd xxx: - thats i have seen for b2, yandex and pcloud buckets

when you say aws sync, that is using the aws cli? rclone doesnt use those though

I think we have a misunderstanding here.
I am using AWS and S3
I just installed rclone on an EC2
The docs recommend “rclone lsd remote:” as a command to list available buckets

This command, rclone ls remote:, is failing as stated above.

i dont think we have a misunderstanding - i understand what you are trying to do :slight_smile:
what i am saying is remote: is just a label - it needs to match [xxx] in your config file. change [xxx] to [remote] in your config file, and it should work :smiley:

aha … “remote” = <name of my bucket>
thanks for being persistent, I totally misunderstood the docs

so the command-
rclone sync <local path> bucketname:bucketname/<path>
works for me.

no probs - glad you got it to work :smiley: