The error notice simply says that READ access to the bucket is refused, yet your API command only says that LIST access was given. Without seeing the associated policy, it is unable to make additional comments on this matter.
You can, however, configure cross-account bucket access instead of specifying the CLI profile on the instance.
To grant access to a role (EC2) in a different account, add a bucket policy to it.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<Account-B-ID>:role/<ec2-role-name>"
},
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::<AccountABucketName>/*"
]
}
]
}
To access the bucket in Account-A, add a policy to the EC2 instance's IAM role.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::<AccountABucketName>/*"
}
]
}
Account-B should now be able to read/write to the bucket.