public static boolean hasAuthForRegistryInDockerConfig(Logger logger, String registry, AuthConfigList authConfigList) throws MojoExecutionException {
        String registryToLookup = Optional.ofNullable(registry).orElse(DOCKER_LOGIN_DEFAULT_REGISTRY);
        AuthConfig authConfigFromDockerConfig = getAuthConfigFromDockerConfig(logger, registryToLookup);
        if (authConfigFromDockerConfig != null) {
            String authsInDockerConfig = new String(Base64.getEncoder().encode((authConfigFromDockerConfig.getUsername() + ":" + authConfigFromDockerConfig.getPassword()).getBytes(StandardCharsets.UTF_8)));
            return authConfigList.toJson().contains(authsInDockerConfig);
        }
        return false;
    }
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