-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SAM build -u completely broken #4685
Comments
@blathersbugs It looks like the container could not start but was downloaded:
This is likely a docker issue and I noticed you are wanting to build for ARM but using x86 (AL2). An alternative is to move your Codebuild compute to ARM and then you don't need docker for building at all. Which avoids your issue completely. |
hi @jfuss this was working before the latest release, so something broke it. If I use an older version of the SAM CLI it still works. |
What version still works? Will help me track down what changes were made. Just looking at the output, it seems docker related but want to isolate changes if another version is working. The tighter we can get on what version works vs doesn't will be super helpful. |
@jfuss although this issue was occurring consistently yesterday, I no longer seem to be able to replicate it. |
It could have been a service issue with Public ECR. For now, let's close this. Please create a new one if you run into this again. I didn't a quick look through recent commits and don't see anything that jumps out to me. On a side note, I made a personal note to look back at your linked Lambda Builders issue. I will do my best to get back at it today. |
|
Description:
SAM Build -u completely broken, unable to pull python3.9 arm container
Steps to reproduce:
sam build -u with a template that has python 3.9 arm layer defined (may be broken for other stuff as well, didn't get past pulling the container to build the first item which was the layer.
Observed result:
[Container] 2023/02/09 22:43:26 Waiting for agent ping
2 | [Container] 2023/02/09 22:43:27 Waiting for DOWNLOAD_SOURCE
3 | [Container] 2023/02/09 22:43:27 Phase is DOWNLOAD_SOURCE
4 | [Container] 2023/02/09 22:43:27 CODEBUILD_SRC_DIR=/codebuild/output/src271887996/src
5 | [Container] 2023/02/09 22:43:27 YAML location is /codebuild/output/src271887996/src/buildspec.yaml
6 | [Container] 2023/02/09 22:43:27 No commands found for phase name: install
7 | [Container] 2023/02/09 22:43:27 Setting HTTP client timeout to higher timeout for S3 source
8 | [Container] 2023/02/09 22:43:27 Processing environment variables
9 | [Container] 2023/02/09 22:43:27 Setting HTTP client timeout to higher timeout for S3 source
10 | [Container] 2023/02/09 22:43:27 Setting HTTP client timeout to higher timeout for S3 source
11 | [Container] 2023/02/09 22:43:27 Selecting 'python' runtime version '3.9' based on manual selections...
12 | [Container] 2023/02/09 22:43:27 Running command echo "Installing Python version 3.9 ..."
13 | Installing Python version 3.9 ...
14 |
15 | [Container] 2023/02/09 22:43:27 Running command pyenv global $PYTHON_39_VERSION
16 |
17 | [Container] 2023/02/09 22:43:30 Moving to directory /codebuild/output/src271887996/src
18 | [Container] 2023/02/09 22:43:30 Configuring ssm agent with target id: codebuild:04beff00-2285-4070-b715-894be02d0dc4
19 | [Container] 2023/02/09 22:43:30 Successfully updated ssm agent configuration
20 | [Container] 2023/02/09 22:43:30 Registering with agent
21 | [Container] 2023/02/09 22:43:30 Phases found in YAML: 2
22 | [Container] 2023/02/09 22:43:30 BUILD: 5 commands
23 | [Container] 2023/02/09 22:43:30 INSTALL: 0 commands
24 | [Container] 2023/02/09 22:43:30 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
25 | [Container] 2023/02/09 22:43:30 Phase context status code: Message:
26 | [Container] 2023/02/09 22:43:30 Entering phase INSTALL
27 | [Container] 2023/02/09 22:43:30 Phase complete: INSTALL State: SUCCEEDED
28 | [Container] 2023/02/09 22:43:30 Phase context status code: Message:
29 | [Container] 2023/02/09 22:43:30 Entering phase PRE_BUILD
30 | [Container] 2023/02/09 22:43:30 Phase complete: PRE_BUILD State: SUCCEEDED
31 | [Container] 2023/02/09 22:43:30 Phase context status code: Message:
32 | [Container] 2023/02/09 22:43:30 Entering phase BUILD
33 | [Container] 2023/02/09 22:43:30 Running command pip install --upgrade aws-sam-cli
34 | Requirement already satisfied: aws-sam-cli in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (1.58.0)
35 | Collecting aws-sam-cli
36 | Downloading aws_sam_cli-1.73.0-py3-none-any.whl (5.3 MB)
37 | Requirement already satisfied: tomlkit==0.7.2 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (0.7.2)
38 | Requirement already satisfied: chevron~=0.12 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (0.14.0)
39 | Requirement already satisfied: regex==2021.9.30 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (2021.9.30)
40 | Requirement already satisfied: docker~=4.2.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (4.2.2)
41 | Requirement already satisfied: serverlessrepo==0.1.10 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (0.1.10)
42 | Collecting cfn-lint==0.72.2
43 | Downloading cfn_lint-0.72.2-py3-none-any.whl (2.5 MB)
44 | Requirement already satisfied: tzlocal==3.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (3.0)
45 | Requirement already satisfied: dateparser~=1.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (1.1.1)
46 | Requirement already satisfied: Flask<2.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (1.1.4)
47 | Requirement already satisfied: watchdog==2.1.2 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (2.1.2)
48 | Requirement already satisfied: cookiecutter~=2.1.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (2.1.1)
49 | Collecting aws-sam-translator==1.59.0
50 | Downloading aws_sam_translator-1.59.0-py3-none-any.whl (885 kB)
51 | Collecting typing-extensions~=4.4.0
52 | Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
53 | Requirement already satisfied: Werkzeug<2.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (1.0.1)
54 | Collecting ruamel-yaml==0.17.21
55 | Downloading ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
56 | Collecting click~=8.0
57 | Downloading click-8.1.3-py3-none-any.whl (96 kB)
58 | Requirement already satisfied: boto3==1.,>=1.19.5 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (1.24.88)
59 | Collecting aws-lambda-builders==1.26.0
60 | Downloading aws_lambda_builders-1.26.0-py3-none-any.whl (117 kB)
61 | Requirement already satisfied: requests==2.25.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (2.25.1)
62 | Collecting pyopenssl==23.0.0
63 | Downloading pyOpenSSL-23.0.0-py3-none-any.whl (57 kB)
64 | Requirement already satisfied: jmespath~=0.10.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (0.10.0)
65 | Requirement already satisfied: PyYAML==5.,>=5.4.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-cli) (5.4.1)
66 | Requirement already satisfied: setuptools in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-lambda-builders==1.26.0->aws-sam-cli) (57.4.0)
67 | Requirement already satisfied: wheel in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-lambda-builders==1.26.0->aws-sam-cli) (0.37.1)
68 | Requirement already satisfied: jsonschema<5,>=3.2 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from aws-sam-translator==1.59.0->aws-sam-cli) (3.2.0)
69 | Collecting pydantic~=1.8
70 | Downloading pydantic-1.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
71 | Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from boto3==1.,>=1.19.5->aws-sam-cli) (0.6.0)
72 | Requirement already satisfied: botocore<1.28.0,>=1.27.88 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from boto3==1.,>=1.19.5->aws-sam-cli) (1.27.88)
73 | Collecting networkx~=2.4
74 | Downloading networkx-2.8.8-py3-none-any.whl (2.0 MB)
75 | Collecting sarif-om~=1.0.4
76 | Downloading sarif_om-1.0.4-py3-none-any.whl (30 kB)
77 | Collecting junit-xml~=1.9
78 | Downloading junit_xml-1.9-py2.py3-none-any.whl (7.1 kB)
79 | Collecting jsonpatch
80 | Downloading jsonpatch-1.32-py2.py3-none-any.whl (12 kB)
81 | Collecting jschema-to-python~=1.2.3
82 | Downloading jschema_to_python-1.2.3-py3-none-any.whl (10 kB)
83 | Collecting cryptography<40,>=38.0.0
84 | Downloading cryptography-39.0.1-cp36-abi3-manylinux_2_24_x86_64.whl (4.1 MB)
85 | Requirement already satisfied: urllib3<1.27,>=1.21.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.25.1->aws-sam-cli) (1.26.12)
86 | Requirement already satisfied: chardet<5,>=3.0.2 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.25.1->aws-sam-cli) (4.0.0)
87 | Requirement already satisfied: idna<3,>=2.5 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.25.1->aws-sam-cli) (2.10)
88 | Requirement already satisfied: certifi>=2017.4.17 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from requests==2.25.1->aws-sam-cli) (2022.9.24)
89 | Collecting ruamel.yaml.clib>=0.2.6
90 | Downloading ruamel.yaml.clib-0.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (519 kB)
91 | Requirement already satisfied: six~=1.11 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from serverlessrepo==0.1.10->aws-sam-cli) (1.16.0)
92 | Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from botocore<1.28.0,>=1.27.88->boto3==1.*,>=1.19.5->aws-sam-cli) (2.8.2)
93 | Requirement already satisfied: binaryornot>=0.4.4 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from cookiecutter~=2.1.1->aws-sam-cli) (0.4.4)
94 | Requirement already satisfied: Jinja2<4.0.0,>=2.7 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from cookiecutter~=2.1.1->aws-sam-cli) (2.11.3)
95 | Requirement already satisfied: python-slugify>=4.0.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from cookiecutter~=2.1.1->aws-sam-cli) (6.1.2)
96 | Requirement already satisfied: jinja2-time>=0.2.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from cookiecutter~=2.1.1->aws-sam-cli) (0.2.0)
97 | Collecting cffi>=1.12
98 | Downloading cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
99 | Collecting pycparser
100 | Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
101 | Requirement already satisfied: pytz in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from dateparser~=1.0->aws-sam-cli) (2022.4)
102 | Requirement already satisfied: websocket-client>=0.32.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from docker~=4.2.0->aws-sam-cli) (1.4.1)
103 | Collecting Flask<2.1
104 | Downloading Flask-2.0.3-py3-none-any.whl (95 kB)
105 | Collecting itsdangerous>=2.0
106 | Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
107 | Collecting Werkzeug<2.1
108 | Downloading Werkzeug-2.0.3-py3-none-any.whl (289 kB)
109 | Collecting Jinja2<4.0.0,>=2.7
110 | Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
111 | Requirement already satisfied: MarkupSafe>=2.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from Jinja2<4.0.0,>=2.7->cookiecutter~=2.1.1->aws-sam-cli) (2.0.1)
112 | Requirement already satisfied: arrow in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from jinja2-time>=0.2.0->cookiecutter~=2.1.1->aws-sam-cli) (1.2.3)
113 | Collecting pbr
114 | Downloading pbr-5.11.1-py2.py3-none-any.whl (112 kB)
115 | Collecting jsonpickle
116 | Downloading jsonpickle-3.0.1-py2.py3-none-any.whl (40 kB)
117 | Requirement already satisfied: attrs in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from jschema-to-python~=1.2.3->cfn-lint==0.72.2->aws-sam-cli) (22.1.0)
118 | Requirement already satisfied: pyrsistent>=0.14.0 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from jsonschema<5,>=3.2->aws-sam-translator==1.59.0->aws-sam-cli) (0.18.1)
119 | Requirement already satisfied: text-unidecode>=1.3 in /root/.pyenv/versions/3.9.12/lib/python3.9/site-packages (from python-slugify>=4.0.0->cookiecutter~=2.1.1->aws-sam-cli) (1.3)
120 | Collecting jsonpointer>=1.9
121 | Downloading jsonpointer-2.3-py2.py3-none-any.whl (7.8 kB)
122 | Installing collected packages: typing-extensions, pycparser, pydantic, pbr, jsonpointer, jsonpickle, Jinja2, cffi, Werkzeug, sarif-om, ruamel.yaml.clib, networkx, junit-xml, jsonpatch, jschema-to-python, itsdangerous, cryptography, click, aws-sam-translator, ruamel-yaml, pyopenssl, Flask, cfn-lint, aws-lambda-builders, aws-sam-cli
123 | Attempting uninstall: typing-extensions
124 | Found existing installation: typing-extensions 3.10.0.0
125 | Uninstalling typing-extensions-3.10.0.0:
126 | Successfully uninstalled typing-extensions-3.10.0.0
127 | Attempting uninstall: Jinja2
128 | Found existing installation: Jinja2 2.11.3
129 | Uninstalling Jinja2-2.11.3:
130 | Successfully uninstalled Jinja2-2.11.3
131 | Attempting uninstall: Werkzeug
132 | Found existing installation: Werkzeug 1.0.1
133 | Uninstalling Werkzeug-1.0.1:
134 | Successfully uninstalled Werkzeug-1.0.1
135 | Attempting uninstall: itsdangerous
136 | Found existing installation: itsdangerous 1.1.0
137 | Uninstalling itsdangerous-1.1.0:
138 | Successfully uninstalled itsdangerous-1.1.0
139 | Attempting uninstall: click
140 | Found existing installation: click 7.1.2
141 | Uninstalling click-7.1.2:
142 | Successfully uninstalled click-7.1.2
143 | Attempting uninstall: aws-sam-translator
144 | Found existing installation: aws-sam-translator 1.51.0
145 | Uninstalling aws-sam-translator-1.51.0:
146 | Successfully uninstalled aws-sam-translator-1.51.0
147 | Attempting uninstall: Flask
148 | Found existing installation: Flask 1.1.4
149 | Uninstalling Flask-1.1.4:
150 | Successfully uninstalled Flask-1.1.4
151 | Attempting uninstall: aws-lambda-builders
152 | Found existing installation: aws-lambda-builders 1.19.0
153 | Uninstalling aws-lambda-builders-1.19.0:
154 | Successfully uninstalled aws-lambda-builders-1.19.0
155 | Attempting uninstall: aws-sam-cli
156 | Found existing installation: aws-sam-cli 1.58.0
157 | Uninstalling aws-sam-cli-1.58.0:
158 | Successfully uninstalled aws-sam-cli-1.58.0
159 | Successfully installed Flask-2.0.3 Jinja2-3.1.2 Werkzeug-2.0.3 aws-lambda-builders-1.26.0 aws-sam-cli-1.73.0 aws-sam-translator-1.59.0 cffi-1.15.1 cfn-lint-0.72.2 click-8.1.3 cryptography-39.0.1 itsdangerous-2.1.2 jschema-to-python-1.2.3 jsonpatch-1.32 jsonpickle-3.0.1 jsonpointer-2.3 junit-xml-1.9 networkx-2.8.8 pbr-5.11.1 pycparser-2.21 pydantic-1.10.4 pyopenssl-23.0.0 ruamel-yaml-0.17.21 ruamel.yaml.clib-0.2.7 sarif-om-1.0.4 typing-extensions-4.4.0
160 | WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
161 | WARNING: You are using pip version 21.1.2; however, version 23.0 is available.
162 | You should consider upgrading via the '/root/.pyenv/versions/3.9.12/bin/python3.9 -m pip install --upgrade pip' command.
163 |
164 | [Container] 2023/02/09 22:43:56 Running command echo $DOCKER_PASSWORD | docker login --username $DOCKER_USER --password-stdin
165 | WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
166 | Configure a credential helper to remove this warning. See
167 | https://docs.docker.com/engine/reference/commandline/login/#credentials-store
168 |
169 | Login Succeeded
170 |
171 | [Container] 2023/02/09 22:43:57 Running command docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
172 | Unable to find image 'multiarch/qemu-user-static:latest' locally
173 | latest: Pulling from multiarch/qemu-user-static
174 | 205dae5015e7: Pulling fs layer
175 | 816739e52091: Pulling fs layer
176 | 30abb83a18eb: Pulling fs layer
177 | 0657daef200b: Pulling fs layer
178 | 30c9c93f40b9: Pulling fs layer
179 | 0657daef200b: Waiting
180 | 30c9c93f40b9: Waiting
181 | 816739e52091: Verifying Checksum
182 | 816739e52091: Download complete
183 | 30abb83a18eb: Download complete
184 | 205dae5015e7: Verifying Checksum
185 | 205dae5015e7: Download complete
186 | 205dae5015e7: Pull complete
187 | 0657daef200b: Verifying Checksum
188 | 0657daef200b: Download complete
189 | 816739e52091: Pull complete
190 | 30abb83a18eb: Pull complete
191 | 0657daef200b: Pull complete
192 | 30c9c93f40b9: Verifying Checksum
193 | 30c9c93f40b9: Download complete
194 | 30c9c93f40b9: Pull complete
195 | Digest: sha256:fe60359c92e86a43cc87b3d906006245f77bfc0565676b80004cc666e4feb9f0
196 | Status: Downloaded newer image for multiarch/qemu-user-static:latest
197 | Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha
198 | Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm
199 | Setting /usr/bin/qemu-armeb-static as binfmt interpreter for armeb
200 | Setting /usr/bin/qemu-sparc-static as binfmt interpreter for sparc
201 | Setting /usr/bin/qemu-sparc32plus-static as binfmt interpreter for sparc32plus
202 | Setting /usr/bin/qemu-sparc64-static as binfmt interpreter for sparc64
203 | Setting /usr/bin/qemu-ppc-static as binfmt interpreter for ppc
204 | Setting /usr/bin/qemu-ppc64-static as binfmt interpreter for ppc64
205 | Setting /usr/bin/qemu-ppc64le-static as binfmt interpreter for ppc64le
206 | Setting /usr/bin/qemu-m68k-static as binfmt interpreter for m68k
207 | Setting /usr/bin/qemu-mips-static as binfmt interpreter for mips
208 | Setting /usr/bin/qemu-mipsel-static as binfmt interpreter for mipsel
209 | Setting /usr/bin/qemu-mipsn32-static as binfmt interpreter for mipsn32
210 | Setting /usr/bin/qemu-mipsn32el-static as binfmt interpreter for mipsn32el
211 | Setting /usr/bin/qemu-mips64-static as binfmt interpreter for mips64
212 | Setting /usr/bin/qemu-mips64el-static as binfmt interpreter for mips64el
213 | Setting /usr/bin/qemu-sh4-static as binfmt interpreter for sh4
214 | Setting /usr/bin/qemu-sh4eb-static as binfmt interpreter for sh4eb
215 | Setting /usr/bin/qemu-s390x-static as binfmt interpreter for s390x
216 | Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64
217 | Setting /usr/bin/qemu-aarch64_be-static as binfmt interpreter for aarch64_be
218 | Setting /usr/bin/qemu-hppa-static as binfmt interpreter for hppa
219 | Setting /usr/bin/qemu-riscv32-static as binfmt interpreter for riscv32
220 | Setting /usr/bin/qemu-riscv64-static as binfmt interpreter for riscv64
221 | Setting /usr/bin/qemu-xtensa-static as binfmt interpreter for xtensa
222 | Setting /usr/bin/qemu-xtensaeb-static as binfmt interpreter for xtensaeb
223 | Setting /usr/bin/qemu-microblaze-static as binfmt interpreter for microblaze
224 | Setting /usr/bin/qemu-microblazeel-static as binfmt interpreter for microblazeel
225 | Setting /usr/bin/qemu-or1k-static as binfmt interpreter for or1k
226 | Setting /usr/bin/qemu-hexagon-static as binfmt interpreter for hexagon
227 |
228 | [Container] 2023/02/09 22:44:04 Running command sam build -u --debug
229 |
230 | SAM CLI now collects telemetry to better understand customer needs.
231 |
232 | You can OPT OUT and disable telemetry collection by setting the
233 | environment variable SAM_CLI_TELEMETRY=0 in your shell.
234 | Thanks for your help!
235 |
236 | Learn More: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-telemetry.html
237 |
238 | 2023-02-09 22:44:04,984 | Config file location: /codebuild/output/src271887996/src/samconfig.toml
239 | 2023-02-09 22:44:04,984 | Config file '/codebuild/output/src271887996/src/samconfig.toml' does not exist
240 | 2023-02-09 22:44:05,153 | Using SAM Template at /codebuild/output/src271887996/src/template.yaml
241 | 2023-02-09 22:44:05,336 | Using config file: samconfig.toml, config environment: default
242 | 2023-02-09 22:44:05,336 | Expand command line arguments to:
243 | 2023-02-09 22:44:05,336 | --template_file=/codebuild/output/src271887996/src/template.yaml --use_container --build_dir=.aws-sam/build --cache_dir=.aws-sam/cache
244 | 2023-02-09 22:44:05,620 | 'build' command is called
245 | 2023-02-09 22:44:05,620 | Starting Build inside a container
246 | 2023-02-09 22:44:05,786 | Collected default values for parameters: {}
.........
451 | 2023-02-09 22:44:05,920 | --base-dir is not presented, adjusting uri ./lambda/authorizerlayer relative to /codebuild/output/src271887996/src/template.yaml
.......
533 | 2023-02-09 22:44:06,082 | Unique Layer build definition found, adding as new (Layer Build Definition: LayerBuildDefinition(authorizerlayer, /codebuild/output/src271887996/src/lambda/authorizerlayer, , 711e629f-7748-4e98-94d9-e204e41cf320, python3.9, ['python3.9'], arm64, {}), Layer: <samcli.lib.providers.provider.LayerVersion object at 0x7fb41bef2ac0>)
....
537 |
538 | Fetching public.ecr.aws/sam/build-python3.9:latest-arm64 Docker container image.....................................
539 | 2023-02-09 22:44:06,896 | Mounting /codebuild/output/src271887996/src/lambda/authorizerlayer as /tmp/samcli/source:ro,delegated inside runtime container
540 | 2023-02-09 22:44:06,900 | Container was not created. Skipping deletion
541 | 2023-02-09 22:44:06,901 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
542 | 2023-02-09 22:44:07,063 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
543 | 2023-02-09 22:44:07,064 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': 'b948404c-08e0-4e87-9a86-27e6c0818784', 'installationId': 'cbc1284f-027e-480e-9d55-58c563f72629', 'sessionId': '57fed5b4-3d3d-46cb-bf3f-7185ec3dc425', 'executionEnvironment': 'AWSCodeBuild', 'ci': True, 'pyversion': '3.9.12', 'samcliVersion': '1.73.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam build', 'metricSpecificAttributes': {'projectType': 'CFN', 'gitOrigin': None, 'projectName': '25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26', 'initialCommit': None}, 'duration': 1564, 'exitReason': 'RuntimeError', 'exitCode': 255}}]}
544 | 2023-02-09 22:44:07,064 | Unable to find Click Context for getting session_id.
545 | 2023-02-09 22:44:07,066 | Sending Telemetry: {'metrics': [{'events': {'requestId': '66890669-d722-4c3c-8aaa-e15dc3654172', 'installationId': 'cbc1284f-027e-480e-9d55-58c563f72629', 'sessionId': '57fed5b4-3d3d-46cb-bf3f-7185ec3dc425', 'executionEnvironment': 'AWSCodeBuild', 'ci': True, 'pyversion': '3.9.12', 'samcliVersion': '1.73.0', 'metricSpecificAttributes': {'events': [{'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'python3.9', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.080'}, {'event_name': 'BuildWorkflowUsed', 'event_value': 'python-pip', 'thread_id': 140411738552128, 'time_stamp': '2023-02-09 22:44:06.094'}]}}}]}
546 | 2023-02-09 22:44:07,100 | Telemetry response: 200
547 | 2023-02-09 22:44:07,105 | Telemetry response: 200
548 |
549 | Error: Container does not exist. Cannot get logs for this container
550 | Traceback:
551 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/click/core.py", line 1055, in main
552 | rv = self.invoke(ctx)
553 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
554 | return _process_result(sub_ctx.command.invoke(sub_ctx))
555 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
556 | return ctx.invoke(self.callback, **ctx.params)
557 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/click/core.py", line 760, in invoke
558 | return __callback(*args, **kwargs)
559 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func
560 | return ctx.invoke(f, obj, *args, **kwargs)
561 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/click/core.py", line 760, in invoke
562 | return __callback(*args, **kwargs)
563 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/telemetry/metric.py", line 183, in wrapped
564 | raise exception # pylint: disable=raising-bad-type
565 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/telemetry/metric.py", line 150, in wrapped
566 | return_value = func(*args, **kwargs)
567 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/utils/version_checker.py", line 41, in wrapped
568 | actual_result = func(*args, **kwargs)
569 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/cli/main.py", line 92, in wrapper
570 | return func(*args, **kwargs)
571 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/commands/build/command.py", line 186, in cli
572 | do_cli(
573 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/commands/build/command.py", line 279, in do_cli
574 | ctx.run()
575 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/commands/build/build_context.py", line 264, in run
576 | build_result = builder.build()
577 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/build/app_builder.py", line 214, in build
578 | return ApplicationBuildResult(build_graph, build_strategy.build())
579 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/build/build_strategy.py", line 79, in build
580 | result.update(self._build_layers(self._build_graph))
581 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/build/build_strategy.py", line 107, in _build_layers
582 | layer_build_results.update(self.build_single_layer_definition(layer_definition))
583 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/build/build_strategy.py", line 220, in build_single_layer_definition
584 | layer.full_path: self._build_layer(
585 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/build/app_builder.py", line 547, in _build_layer
586 | self._build_function_on_container(
587 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/lib/build/app_builder.py", line 936, in _build_function_on_container
588 | container.wait_for_logs(stdout=stdout_stream, stderr=stderr_stream)
589 | File "/root/.pyenv/versions/3.9.12/lib/python3.9/site-packages/samcli/local/docker/container.py", line 328, in wait_for_logs
590 | raise RuntimeError("Container does not exist. Cannot get logs for this container")
591 |
592 | An unexpected error was encountered while executing "sam build".
593 | Search for an existing issue:
594 | https://github.com/aws/aws-sam-cli/issues?q=is%3Aissue+is%3Aopen+Bug%3A%20sam%20build%20-%20RuntimeError
595 | Or create a bug report:
596 | https://github.com/aws/aws-sam-cli/issues/new?template=Bug_report.md&title=Bug%3A%20sam%20build%20-%20RuntimeError
597 |
598 | [Container] 2023/02/09 22:44:07 Command did not exit successfully sam build -u --debug exit status 1
599 | [Container] 2023/02/09 22:44:07 Phase complete: BUILD State: FAILED
600 | [Container] 2023/02/09 22:44:07 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: sam build -u --debug. Reason: exit status 1
601 | [Container] 2023/02/09 22:44:07 Entering phase POST_BUILD
602 | [Container] 2023/02/09 22:44:07 Phase complete: POST_BUILD State: SUCCEEDED
603 | [Container] 2023/02/09 22:44:07 Phase context status code: Message:
604 | [Container] 2023/02/09 22:44:07 Expanding base directory path: .
605 | [Container] 2023/02/09 22:44:07 Assembling file list
606 | [Container] 2023/02/09 22:44:07 Expanding .
607 | [Container] 2023/02/09 22:44:07 Expanding file paths for base directory .
608 | [Container] 2023/02/09 22:44:07 Assembling file list
609 | [Container] 2023/02/09 22:44:07 Expanding template-out.yaml
610 | [Container] 2023/02/09 22:44:07 Skipping invalid file path template-out.yaml
611 | [Container] 2023/02/09 22:44:07 Phase complete: UPLOAD_ARTIFACTS State: FAILED
612 | [Container] 2023/02/09 22:44:07 Phase context status code: CLIENT_ERROR Message: no matching artifact paths found
613
Expected result:
successful build
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
:us west 2
Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: