pipe-cd / pipe-cd/pipecd

bug(lambda): parseContainerImage fails to parse images with registry ports

Open
#6,577 2 comments 0 reactions 1 assignee View on GitHub

@zyzzmohit is already working on this.

Since Apr 15, 2026.

kind/bug
Dominant language
Go
Stars
1.4k
Forks
364
Avg merge
1d 4h
Merged PRs (30d)
84

Description

What happened:

In pkg/app/piped/platformprovider/lambda/function.go, the parseContainerImage function naively splits the image string by : to extract the image tag. However, if a user relies on a container image hosted in a registry that specifies a port (e.g., localhost:5000/repo/image:tag or my-registry.com:8443/app:v1), the function incorrectly splits the URI. This results in a misparsed name and an empty tag.

This is the exact same parsing bug recently identified and fixed in the Cloud Run provider and the ECS provider. Because AWS Lambda container deployments may utilize custom Docker registries with ports, this is a necessary defensive fix mapping to real-world use cases and ensures parity across providers.

What you expected to happen:

The function should correctly isolate the registry/repository path from the tag using strings.LastIndex, properly handling images with registry ports.

How to reproduce it (as minimally and precisely as possible):

Deploy an AWS Lambda application using a function manifest that contains an image with a port in the registry URL:
image: localhost:5000/lambda-test:v0.0.1
Functions like FindArtifactVersions will fail to correctly parse it.

Anything else we need to know?:

I have already implemented the strings.LastIndex fix parity and added the necessary test coverage. I will link the PR below!

Environment:

  • PipeCD version: master

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.