I have ECS
which runs on EC2
Normally, I put some containers on EC2 node and run the services (That's the basic practice of ECS
....)
However,now I need to run the code on EC2 directry, So I put the code in userdata and which uses boto3
(for monitoring GPU)
However this error happens.
botocore.exceptions.NoCredentialsError: Unable to locate credentials
In container, I run the script including boto3
, this error doesn't occur.
So I guess aws credential
is automatically set in container
but not in EC2
node on ECS
. Am I correct?
However can I do the equivalent setting in EC2 node?