debug lambda using private docker registry, --build-image
See original GitHub issueI’m struggling to start a debug session of a local lambda function. I’ve added a debug configuration and added the following launch config:
"launch": {
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "lambdas:index.handler (nodejs14.x)",
"invokeTarget": {
"target": "code",
"projectRoot": "${workspace}/lambdas",
"lambdaHandler": "index.handler"
},
"lambda": {
"runtime": "nodejs14.x",
"payload": {"json": {
"Records": [
{
"messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78",
"receiptHandle": "MessageReceiptHandle",
"body": "Hello from SQS!",
"attributes": {
"ApproximateReceiveCount": "1",
"SentTimestamp": "1523232000000",
"SenderId": "123456789012",
"ApproximateFirstReceiveTimestamp": "1523232000001"
},
"messageAttributes": {},
"md5OfBody": "{{{md5_of_body}}}",
"eventSource": "aws:sqs",
"eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:MyQueue",
"awsRegion": "us-east-1"
}
]
}},
"environmentVariables": {
}
}
}
]
}
If I try and run the sam local invoke... manually I get an error when trying to build the docker image. I have a private docker registry that I’m required to use. Maybe I need to change the registry that sam cli is using?
Also, when I try to use the debug configuration it shows a successful build but then pops up with this window:

Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Use a Private Docker Registry for Real-Time Inference ...
To use a private Docker registry to store your images for SageMaker real-time inference, create a private registry that is accessible from your...
Read more >Using Docker Image Registries - CloudBees Documentation
Registry Authentication. If you are using private images, you will need to authenticate with the image registries to pull and push from your...
Read more >AWS Lambda is Unable to find app.handler (Custom Docker ...
It doesn't seems to be installed from the dockerfile. Testing with the RIE gives you the same environment of the lambda so you...
Read more >"sam build -u -e TARGET_CC=foo" leads to "cargo: Command ...
(base) rvalls@m1 s3-rust-noodles-bam % sam build --debug --use-container -e TARGET_CC=gcc 2021-08-03 12:46:09,833 | Telemetry endpoint ...
Read more >Storing Serverless Functions on AWS ECR via GitLab
Recently we had to deploy TriggerMesh in an environment where the container registry used was AWS ECR. We usually deploy a private registry ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Launch configs can specify
sam.buildArguments:Thanks. I’ll have to test this out and get back.