Authorization error with AWS
When trying to access an Image in ECR and spin it up(which is handled by someone else’s code) it threw error below. I wish I had more information but all I know is that code which is running on an EC2 instance is not able to spin up my container because it has a missing secret key in
Amazon.ECR.AmazonECRException: 'WITH:' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=SET WITH: dotnet user-secrets set RegistryConfig:AccessKeyId/20170615/us-west-1/ecr/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=someguid'. ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
- My Question is that where do I find these keys?
- If I do aws configure on my ec2 instance, it is having a key set up already
- Do I need to pass it to the Docker Container that I am trying to spin up?
- If yes, the what is the best way to pass these values?