Skip to content
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

[GENERAL ISSUE] sam build fails due to certificate problem #386

Closed
polothy opened this issue Jul 20, 2023 · 5 comments
Closed

[GENERAL ISSUE] sam build fails due to certificate problem #386

polothy opened this issue Jul 20, 2023 · 5 comments
Labels

Comments

@polothy
Copy link

polothy commented Jul 20, 2023

Describe the issue

Was trying out the new sam build option and got this far:

❯ sam build --use-container
Starting Build inside a container
Building codeuri: /path/to/cloudformation-guard runtime: provided.al2 metadata: {'BuildMethod': 'makefile'} architecture: x86_64 functions: CloudFormationGuardLambda

Fetching public.ecr.aws/sam/build-provided.al2:latest-x86_64 Docker container image........................................................................................................................................................................................................................................................................................................................................................................................................................................................
Mounting /path/to/cloudformation-guard as /tmp/samcli/source:ro,delegated, inside runtime container

Build Failed
Running CustomMakeBuilder:CopySource
Running CustomMakeBuilder:MakeBuild
Current Artifacts Directory : /tmp/samcli/artifacts
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source /root/.cargo/env && rustup target add x86_64-unknown-linux-musl
Error: CustomMakeBuilder:MakeBuild - Make Failed: curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
/bin/sh: /root/.cargo/env: No such file or directory
make: *** [build-CloudFormationGuardLambda] Error 1

Looks like something is wrong with certs in the docker image. I can run curl on my computer and it works fine, EG this works:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs

Operating System:
MacOS

OS Version
13.4.1

@joshfried-aws
Copy link
Contributor

Hi @polothy thank you for notifying the team. We will investigate and reply with our findings.

@joshfried-aws
Copy link
Contributor

Hi @polothy we were unable to reproduce this issue locally. Would you mind attempting to reproduce it on your side again?

Thanks,

image

@polothy
Copy link
Author

polothy commented Aug 24, 2023

Hello thanks for trying. Glad it's working for you, I'm still having the same error. I'm on Intel Core i9 and Docker Desktop 4.22.1 (118664).

But, this seems like a "something is wrong with your environment" vs something wrong with the Guard project.

@joshfried-aws
Copy link
Contributor

Hi @polothy have you tried downgrading docker version?

@joshfried-aws
Copy link
Contributor

I'm going to close out this issue since as you reported it seems to be more an issue with your own environment. Please feel free to reopen if you think otherwise.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants