AwsS3Client exception: Forbidden when reading S3 file


#1

I’m trying to export data from a 7.2 environment to another one 7.6 with the Export API.
Then, I move the exported files from the source bucket (on the 7.2. env) to the destination bucket (on the 7.6 env) with something like:

S3.moveFiles("s3://c3-7.2-bucket/migration/20180427123645/Organization/", "s3://c3-7.6-bucket/migration/20180427123645/Organization/")

Now, I can read the moved files from the source environment even if they are on the destination bucket, but when I try to read the file from the destination environment I get a AwsS3Client exception: Forbidden:

> S3File.make({url: "s3://c3-7.6-bucket/migration/20180427123645/Organization/part-0.json"}).readString()
AwsS3Client exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: 00510648C307B933)↵errorCode="403 Forbidden"; errorType="Client"; requestId="00510648C307B933"; serviceName="Amazon S3"; httpStatusCode="403"

I have full access on this bucket from the 7.6 env:

> AwsS3Bucket.fromName("c3-7.6-bucket").getResource().grants
(2) [C3.t…s.Obj, C3.t…s.Obj, _type: {…}]
0: C3.typesys.Obj {permission: "FULL_CONTROL", canonicalGrantee: C3.t…s.Obj}
1: C3.typesys.Obj {permission: "FULL_CONTROL", canonicalGrantee: C3.t…s.Obj}
length:2
_type: {_kind: "arry", _init: {…}, _keyType: {…}, _elementType: {…}}
__proto__: Array

Any idea why this error? is it some permissions on the file that doesn’t allow read?


Customer cannot read files exported to their S3 bucket