I'm not able to synchronize a log-folder to s3 inside a container.
I'm trying to get the following setup:
Docker Container with installed awscli
- there are logfiles and other files generated inside the container
There is a cronjob, which calls the "aws s3 sync" command through a shell-script.
The synchronisation is not working properly and I'm not sure why not.
I tried the following, which worked just fine:
provided access key/secret access key inside the docker container
- this worked locally, with plain ECS and with fargate
- but it's not recommended to use the access keys
plain ECS without any keys (just the IAM role)
- this worked too
I played a little with the configuration and read through the documentation. The only hints I got are:
- Has it something to do with the network mode "awsvpc"? (which fargate has to use)
- Has it something to do with the "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" path variable?
- I found a few hits there on the web, but I'm not sure if it's set or not. I'm not able to look inside the container in fargate.
awslogs
– OK999