Communication problem between Ecs task and s3

0

I have an ecs task that is running docker containers. One of this tasks access an s3 bucket which contains json files and reads one of those files. Everything works fine until you update one of the files(the ecs task are running). After you update the files then the read from s3 failes with "Json decode error". If you restart the ECS tasks everything works well.

已提問 1 年前檢視次數 254 次
1 個回答
0

This sound like you implemented the S3 GetObject API incorrectly. I don't think it has anything to do with the communication between ECS and S3, because your code gives the error "Json decode error", which means that it has read the file (so the communication works), but for some reason, the "re-get" method doesn't read the object content.

Hard to give an answer without seeing the code, but I guess that the "re-get" object API call is not doing what you think it is. I would log the object content as a string instead of JSON, which should give you a clue about what happening.

profile picture
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南