diff --git a/src/main/java/io/kestra/plugin/aws/ecr/GetAuthToken.java b/src/main/java/io/kestra/plugin/aws/ecr/GetAuthToken.java index 68c06955..43d15fae 100644 --- a/src/main/java/io/kestra/plugin/aws/ecr/GetAuthToken.java +++ b/src/main/java/io/kestra/plugin/aws/ecr/GetAuthToken.java @@ -58,7 +58,14 @@ public TokenOutput run(RunContext runContext) throws Exception { String encodedToken = authorizationData.get(0).authorizationToken(); byte[] decodedTokenBytes = Base64.getDecoder().decode(encodedToken); - return TokenOutput.builder().token(new String(decodedTokenBytes)).build(); + String token = new String(decodedTokenBytes); + if (token.indexOf(":") > 0) { + token = token.substring(token.indexOf(":") + 1); + } + + return TokenOutput.builder() + .token(token) + .build(); } }