для docker swarm
создал юзера с:
- полиси отсюда https://docs.docker.com/config/containers/logging/awslogs/#credentials
- добавил роли CloudWatchFullAccess, CloudWatchFullAccessV2
Ввожу команду для обновления сервиса
docker service update --log-driver awslogs --log-opt awslogs-region=us-east-1 --log-opt awslogs-group="some_group_name" --log-opt awslogs-stream="main" --env-add AWS_ACCESS_KEY_ID=<key> --env-add AWS_SECRET_ACCESS_KEY=<key> ai_app_api
Получаю ошибку
Error response from daemon: failed to create Cloudwatch log stream: operation error CloudWatch Logs: CreateLogStream, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, http response error StatusCode: 404, request to EC2 IMDS failed
Куда копать?
https://stackoverflow.com/questions/38836463/how-to-use-awslog-driver-in-to-get-the-logs-from-the-docker-container
Обсуждают сегодня