Im using Swift for iOS and trying to write to S3 while writing to DynamoDB and the DynamoDB "write" goes through but the S3 "write" doesn't -- would anyone happen to know why? Credentials look fine.

0

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

1 Respuesta
0

Hello.

A possible cause is that the IAM policy you are using does not have sufficient permissions.
In addition, I think that an error may occur if the S3 name is different or the region is different.
In addition, errors may occur if the time, etc. of the upload source device is incorrect.

profile picture
EXPERTO
respondido hace 10 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas