private static AuthConfig getAuthConfigFromDockerConfig(Logger log, String registry) throws MojoExecutionException {
        JsonObject dockerConfig = DockerFileUtil.readDockerConfig();
        if (dockerConfig == null) {
            return null;
        }
        String registryToLookup;
        if (registry != null && Arrays.stream(DEFAULT_REGISTRIES).noneMatch(r -> r.equalsIgnoreCase(registry))) {
            registryToLookup = registry;
        } else {
            registryToLookup = DOCKER_LOGIN_DEFAULT_REGISTRY;
        }

        if (dockerConfig.has("credHelpers") || dockerConfig.has("credsStore")) {
            if (dockerConfig.has("credHelpers")) {
                final JsonObject credHelpers = dockerConfig.getAsJsonObject("credHelpers");
                if (credHelpers.has(registryToLookup)) {
                    return extractAuthConfigFromCredentialsHelper(log, registryToLookup, credHelpers.get(registryToLookup).getAsString());
                }
            }
            if (dockerConfig.has("credsStore")) {
                return extractAuthConfigFromCredentialsHelper(log, registryToLookup, dockerConfig.get("credsStore").getAsString());
            }
        }

        if (dockerConfig.has("auths")) {
            return extractAuthConfigFromDockerConfigAuths(registryToLookup, dockerConfig.getAsJsonObject("auths"));
        }

        return null;
    }
Try using the AWS credentials provided via ENV variables.
See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
src/main/java/io/fabric8/maven/docker/util/AuthConfigFactory.java