DEV Community

Discussion on: Using container image support for AWS Lambda with AWS SAM and Codebuild/Codepipeline

Collapse
 
ygorthomaz profile image
Ygor Thomaz • Edited

Quick question.

Did you face this error message in some point of your CICD project:

AWS CodeBuild output:
`Building codeuri: . runtime: None metadata: {'DockerTag': 'go1.14.x', 'DockerContext': './functions/ftp-publisher', 'Dockerfile': 'Dockerfile'} functions: ['Function1']
Building image for Function1 function

Build Failed
Error: Building image for Function1 requires Docker. is Docker running?`

SAM build looks like this:
sam build --template-file functions/xxxx/sn-xxxxx/sam-template.yml --base-dir /codebuild/output/src846189501/src --parameter-overrides 'some...'

CodeBuild:
...
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Type: LINUX_CONTAINER
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
...
runtime-versions: golang: 1.14

Thanks for the article! :)

Collapse
 
enryold profile image
Enrico Vecchio

Hi Ygor, it seems that your Codebuild is not running in "privileged mode", try to activate it and retry!

Collapse
 
ygorthomaz profile image
Ygor Thomaz

Thanks!! It worked.