I was attempting to use localstack to run integration tests against a local dynamodb database when I kept getting errors like this:
Error: Target error should be in err chain:
expected: ""
in chain: "operation error DynamoDB: Query, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"operation error DynamoDB: Query, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"
"request canceled, context deadline exceeded"
"context deadline exceeded"
Test: TestIntegrationTestSuite/TestRepoListAll
Messages: ListAll returned err: operation error DynamoDB: Query, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded
ddb_test.go:27: Found 0 profiles
After much trial and error, i created an AWS profile with nonsense values, e.g:
aws configure
AWS Access Key ID [None]: test
AWS Secret Access Key [None]: test
Default region name [None]: us-west-2
Default output format [None]:
And everything worked. Im just curious why, is this intended, is it a bug, etc.
Thanks!