I am creating an iOS application in swift where I am writing some data to DynamoDB. I am doing this through a user i have created which has access to DynamoDB and I am accessing my credentials as environmental variables that I have stored in swift. I start off by reading my data in DynamoDB with AWSDynamoDBObjectMapper.default().scan and then I proceed to write to DynamoDB if the data I want to input isn't already present in my database. The problem is, I am simultaneously attempting to write to S3 within my AWSDynamoDBObjectMapper.default().scan call but I keep on getting an error that says:
S3 Upload Error Description: The operation couldn’t be completed. (com.amazonaws.AWSS3TransferUtilityErrorDomain error 2.)
I have a user in place that gives me full access to S3 and I also have the correct credentials in place to access my S3 bucket. However, for some reason I can't write to the bucket. I was initially using Firebase instead of DynamoDB and everything was working fine. The problem is coming up now that I have shifted over to using DynamoDB with Swift instead. Would anyone happen to know what is going wrong? I have debug statements in place that tell me that the code fails at the
AWSS3TransferUtility.default().uploadData() part.
Thanks -- any help and explanation would be much appreciated