-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ecr] CDK DockerBundling should use the underlying default image from ECR #11296
Comments
I can confirm the issue. This is causing all of our pipelines to fail. |
My team is also having this issue with the image |
My pipeline is also failing on
|
We have the same issue with PythonFunction A way to set the docker login would be great to use the images hosted on ecr. see: #11544 |
Assuming that you build your CDK apps in a pipeline, the issue can be fixed by including a docker login in the buildspec.yaml file as follows:
Works great for us. Thx to @skinny85 for the hint. |
With the release of Amazon ECR Public Gallery Im guessing however |
Hello @MrArnoldPalmer Any estimate timeline around when CDK would start leveraging base images from AWS Public ECR? For now, we are still stuck in doing |
@srinivasreddych no estimate on this right now, though I understand the pain this is causing as pretty much every developer using docker as started running into these new rate limits. I need to look around a bit for other usage of dockerhub images in the cdk codebase that affect user's synth/deploy. I'll provide an update when I'm able to do that. |
We are running into this issue using CDK Python lambda asset bundling as described here. It isn't clear to me how I can fix this with supplying docker credentials as a work around... |
Same here. It’s better moving the image to https://gallery.ecr.aws/ . |
Adding more weight to this one, its clobbering my build process repeatably. Using Python Lambdas. I can'te see how to fix this either. |
So, here is what we did to work around this annoying issue.. We took a copy of build image and placed it in our own ECR. Then created a bundling image.. Here is an example of how you might be able to work around it.
|
I had a similiar issue on the nodejs side of things, and hopefully this might help to point someone in a direction that might help. Both my NodejsFunction constructs and LayerVersion constructs for our cdk definitions utilized the docker library's amazon/aws-sam-cli-build-image-nodejs12.x:latest build images. And very quickly I ran into the rate limiting issue from docker again... Being "cheap"... I mean wanting to save our company money I didn't want to create a new docker account and go through all that hassle, rather I utilized the aws ecr library as follow: within cdk for nodejs by default I call the lambda construct as follow:
and the layer is constructed in a different stack in a similiar fashion. But changing it as follow resolved it for me:
|
I see the sam image used by CDK is made available within Public ECR. Any idea if we can start leveraging it? @MrArnoldPalmer |
This is my workaround: I define a new runtime and set the bundlingDockerImage to the one in ECR gallery. const pythonRuntime = new lambda.Runtime('python3.7', lambda.RuntimeFamily.PYTHON, {
supportsInlineCode: true,
supportsCodeGuruProfiling: true,
bundlingDockerImage: 'public.ecr.aws/sam/build-python3.7',
});
const func = new pythonlambda.PythonFunction(this, 'lambda', {
runtime: pythonRuntime, // Still uses
...
} Just the output is a bit weird as it also shows the default value for the
|
|
For whatever reason this doesn't seem to work, at least consistently in
my Fn implementation... new PythonFunction(this, 'MyFn', {
entry: path.join(__dirname, 'lambda', 'fns', 'my_fn'),
runtime: new Runtime('python3.7', RuntimeFamily.PYTHON, {
bundlingDockerImage: 'public.ecr.aws/sam/build-python3.7',
supportsInlineCode: true
}),
role: myRole
}) |
Can you update to a newer version? This has already been fixed. |
As per the latest DockerHub rate limit release, the activity of running cdk bundling is causing us rate limit issues. It would be great if CDK would switch the default dockerimage from
“amazon/aws-sam-cli-build-image-” https://hub.docker.com/u/amazon
to an image hosted in AWS ECR.Use Case
Our build systems run cdk deploy which will bundle assets for lambda functions. For bundling the assets, cdk would pull
amazon/aws-sam-cli-build-image
and perform the activity. It would be great to have CDK rely on an image hosted outside of DockerHub.Error seen
Unable to find image 'amazon/aws-sam-cli-build-image-python3.6:latest' locally
docker: Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit.
The text was updated successfully, but these errors were encountered: