I'm using AWS ECS service for orchestrate my docker container.
Also used Secret Manager for stored and retrieve personal information.
I apply SecretsManagerReadWrite
policy to my ecsTaskExecutionRole
and ecsServiceRole
.
Before using Fargate
, I just used ECS with EC2.
And it works fine.
But in fargate
, it throw NoCredentialsError
I fetched to secret manager via python script that made with boto3. (https://docs.aws.amazon.com/ko_kr/code-samples/latest/catalog/python-secretsmanager-secrets_manager.py.html)
Is there any solution here?
Thanks.
CUSTOM Permission
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"secretsmanager:GetSecretValue",
"ssm:GetParameters"
],
"Resource": "*"
}
]
}