‘fatal error: Unable to locate credentials’ in Docker build after EC2 upgrade to IMDSv2
I have recently upgraded a GHA runner EC2 instance to use IMDSv2, after the upgrade my build pipeline is failing with error – “fatal error: Unable to locate credentials” at Docker build step while executing ‘aws s3 cp <> <>‘ from Docker file. If I switch the GHA runner instance to use IMDSv1 the Docker build goes successfully.