Closed aleCeres closed 2 years ago
Can you provide log with --debug
flag specified and also your docker version?
I tried to reproduce this with similar number of Image type functions and they finished within a minute.
One possible workaround is to use --warm-containers LAZY
and defer emulation image building to later when functions are invoked.
Sure:
2021-07-09 16:27:50,997 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2021-07-09 16:27:50,998 | Using config file: samconfig.toml, config environment: default
2021-07-09 16:27:50,998 | Expand command line arguments to:
2021-07-09 16:27:50,998 | --template_file=/pathToTemplate/template.yml --docker_network=td_net --port=4000 --warm_containers=EAGER --host=127.0.0.1 --static_dir=public --layer_cache_basedir=/Users/path_to_home/.aws-sam/layers-pkg --container_host=localhost --container_host_interface=127.0.0.1
2021-07-09 16:27:51,115 | local start-api command is called
2021-07-09 16:27:51,148 | No Parameters detected in the template
2021-07-09 16:27:51,194 | 15 stacks found in the template
2021-07-09 16:27:51,194 | No Parameters detected in the template
2021-07-09 16:27:51,233 | 15 resources found in the stack
2021-07-09 16:27:51,233 | No Parameters detected in the template
2021-07-09 16:27:51,273 | No Parameters detected in the template
2021-07-09 16:27:51,311 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,311 | Found Serverless function with name='f1' and CodeUri='.'
2021-07-09 16:27:51,311 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,312 | No Parameters detected in the template
2021-07-09 16:27:51,353 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,354 | Found Serverless function with name='f2' and CodeUri='.'
2021-07-09 16:27:51,354 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,354 | No Parameters detected in the template
2021-07-09 16:27:51,391 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,392 | Found Serverless function with name='f3' and CodeUri='.'
2021-07-09 16:27:51,392 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,392 | No Parameters detected in the template
2021-07-09 16:27:51,430 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,430 | Found Serverless function with name='f4' and CodeUri='.'
2021-07-09 16:27:51,430 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,430 | No Parameters detected in the template
2021-07-09 16:27:51,470 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,471 | Found Serverless function with name='f5' and CodeUri='.'
2021-07-09 16:27:51,471 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,471 | No Parameters detected in the template
2021-07-09 16:27:51,510 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,511 | Found Serverless function with name='f6' and CodeUri='.'
2021-07-09 16:27:51,511 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,511 | No Parameters detected in the template
2021-07-09 16:27:51,551 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,551 | Found Serverless function with name='f7' and CodeUri='.'
2021-07-09 16:27:51,551 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,551 | No Parameters detected in the template
2021-07-09 16:27:51,593 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,593 | Found Serverless function with name='f8' and CodeUri='.'
2021-07-09 16:27:51,593 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,593 | No Parameters detected in the template
2021-07-09 16:27:51,633 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,633 | Found Serverless function with name='f9' and CodeUri='.'
2021-07-09 16:27:51,633 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,633 | No Parameters detected in the template
2021-07-09 16:27:51,672 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,672 | Found Serverless function with name='f10' and CodeUri='.'
2021-07-09 16:27:51,672 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,672 | No Parameters detected in the template
2021-07-09 16:27:51,711 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,712 | Found Serverless function with name='f11' and CodeUri='.'
2021-07-09 16:27:51,712 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,712 | No Parameters detected in the template
2021-07-09 16:27:51,753 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,753 | Found Serverless function with name='f12' and CodeUri='.'
2021-07-09 16:27:51,753 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,753 | No Parameters detected in the template
2021-07-09 16:27:51,789 | --base-dir is not presented, adjusting uri ./ relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,789 | Found Serverless function with name='f13' and CodeUri='.'
2021-07-09 16:27:51,789 | --base-dir is not presented, adjusting uri . relative to /pathToTemplate/template.yml
2021-07-09 16:27:51,802 | Initializing the lambda functions containers.
2021-07-09 16:27:51,803 | Async execution started
2021-07-09 16:27:51,803 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f1', functionname='f1', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f1/f1.f1', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e97a070>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f1', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,824 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f2', functionname='f2', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f2/f2.f2', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e85cf10>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f2', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,824 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f3', functionname='f3', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f3/f3.f3', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e85cee0>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f3', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,824 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f4', functionname='f4', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f4/f4.f4', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e8b0490>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f4', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,825 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f5', functionname='f5', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f5/f5.f5', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e8b0130>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f5', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,827 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f6', functionname='f6', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f6/f6.f6', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e85c460>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f6', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,827 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f7', functionname='f7', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f7/f7.f7', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e85c1f0>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f7', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,828 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f8', functionname='f8', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f8/f8.f8', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e8c9f10>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f8', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,830 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f9', functionname='f9', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f9/f9.f9', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e8165e0>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f9', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,833 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f10', functionname='f10', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f10/f10.f10', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e85ce80>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f10', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,835 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f11', functionname='f11', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f11/f11.f11', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10ea27160>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f11', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,837 | Environment variables overrides data is standard format
2021-07-09 16:27:51,838 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f12', functionname='f12', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f12/f12.f12', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e8b0190>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f12', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,838 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,841 | Environment variables overrides data is standard format
2021-07-09 16:27:51,844 | Environment variables overrides data is standard format
2021-07-09 16:27:51,846 | Invoking function functools.partial(<function InvokeContext._initialize_all_functions_containers.<locals>.initialize_function_container at 0x10e847af0>, Function(name='f13', functionname='f13', runtime='nodejs14.x', memory=128, timeout=100, handler='dist/handlers/f13/f13.f13', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='path_to_repo', environment={'Variables': {ENV: $ENV}'}}, rolearn='arn:aws:iam::AWS_ROOT_ID:role/my_role', layers=[<samcli.lib.providers.provider.LayerVersion object at 0x10e8169a0>], events={'Api': {'Type': 'Api', 'Properties': {'Path': '/f13', 'Method': 'POST', 'RestApiId': 'ServerlessRestApi'}}}, metadata={'BuildMethod': 'makefile'}, inlinecode=None, codesign_config_arn=None, stack_path=''))
2021-07-09 16:27:51,847 | Environment variables overrides data is standard format
2021-07-09 16:27:51,859 | Environment variables overrides data is standard format
2021-07-09 16:27:51,860 | Environment variables overrides data is standard format
2021-07-09 16:27:51,867 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,869 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,873 | Environment variables overrides data is standard format
2021-07-09 16:27:51,874 | Environment variables overrides data is standard format
2021-07-09 16:27:51,877 | Environment variables overrides data is standard format
2021-07-09 16:27:51,907 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,883 | Environment variables overrides data is standard format
2021-07-09 16:27:51,883 | Environment variables overrides data is standard format
2021-07-09 16:27:51,883 | Waiting for async results
2021-07-09 16:27:51,884 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,884 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,884 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,891 | Environment variables overrides data is standard format
2021-07-09 16:27:51,902 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,906 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,881 | Environment variables overrides data is standard format
2021-07-09 16:27:51,920 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,922 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,930 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:51,958 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:51,988 | Loading AWS credentials from session with profile 'None'
2021-07-09 16:27:52,012 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,016 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,019 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,042 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,047 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,047 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,050 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,051 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,055 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,056 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,059 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,060 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,060 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,065 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,065 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,068 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,072 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,073 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,074 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,089 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,074 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,075 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,076 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,077 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,077 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,077 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,078 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,089 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,089 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,089 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,089 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,075 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,090 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,090 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,091 | Resolved absolute path to code is path_to_repo
Building image...Building image...2021-07-09 16:27:52,091 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,091 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,091 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,092 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,092 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,092 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,093 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,093 | Resolved absolute path to code is path_to_repo
2021-07-09 16:27:52,094 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,094 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,217 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,217 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,218 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,218 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,218 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,218 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,219 | Code path_to_repo is not a zip/jar file
2021-07-09 16:27:52,221 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,222 | RuntimeDependenciesLayer is a local Layer in the template
Building image...Building image...2021-07-09 16:27:52,222 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
Building image...2021-07-09 16:27:52,223 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,223 | RuntimeDependenciesLayer is a local Layer in the template
Building image...2021-07-09 16:27:52,224 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,226 | RuntimeDependenciesLayer is a local Layer in the template
2021-07-09 16:27:52,227 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,229 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
Building image...Building image...Building image...2021-07-09 16:27:52,232 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,233 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
2021-07-09 16:27:52,235 | Resolving code path. Cwd=path_to_repo, CodeUri=path_to_repo
Building image...Building image...Building image...Building image...
2021-07-09 16:36:00,972 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:00,972 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container .. 2021-07-09 16:36:01,474 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:01,475 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container .......... 2021-07-09 16:36:07,602 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:07,602 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container .. .. 2021-07-09 16:36:08,261 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:08,261 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container 2021-07-09 16:36:08,328 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:08,328 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container .. 2021-07-09 16:36:08,947 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:08,947 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container ... . 2021-07-09 16:36:11,872 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:11,872 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container 2021-07-09 16:36:11,891 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:11,892 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container .. 2021-07-09 16:36:12,422 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:12,422 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container .. ..2021-07-09 16:36:12 Connection pool is full, discarding connection: localhost
2021-07-09 16:36:12,548 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:12,549 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container ..2021-07-09 16:36:12 Connection pool is full, discarding connection: localhost
..2021-07-09 16:36:12 Connection pool is full, discarding connection: localhost
2021-07-09 16:36:12,714 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:12,716 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container 2021-07-09 16:36:12,717 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:12,718 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container 2021-07-09 16:36:12,762 | Skip pulling image and use local one: samcli/lambda:nodejs14.x-f88a901bbe51b578e9260ae49.
2021-07-09 16:36:12,762 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container 2021-07-09 16:36:12,762 | Mounting path_to_repo as /var/task:ro,delegated inside runtime container 2021-07-09 16:38:06,353 | Async execution completed 2021-07-09 16:38:06,354 | Containers Initialization is done. 2021-07-09 16:38:06,354 | No Parameters detected in the template 2021-07-09 16:38:06,395 | No Parameters detected in the template 2021-07-09 16:38:06,432 | Found '1' API Events in Serverless function with name 'f1' 2021-07-09 16:38:06,432 | Found '1' API Events in Serverless function with name 'f2' 2021-07-09 16:38:06,432 | Found '1' API Events in Serverless function with name 'f3' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f4' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f5' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f6' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f7' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f8' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f9' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f10' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f11' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f12' 2021-07-09 16:38:06,433 | Found '1' API Events in Serverless function with name 'f13' 2021-07-09 16:38:06,433 | Detected Inline Swagger definition 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f1' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f2' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f3' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f4' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f5' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f6' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f7' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f8' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f9' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f10' method='post' 2021-07-09 16:38:06,433 | Lambda function integration not found in Swagger document at path='/f11' method='post' 2021-07-09 16:38:06,434 | Lambda function integration not found in Swagger document at path='/f12' method='post' 2021-07-09 16:38:06,434 | Lambda function integration not found in Swagger document at path='/f13' method='post' 2021-07-09 16:38:06,434 | Found '0' APIs in resource 'ServerlessRestApi' 2021-07-09 16:38:06,434 | Removed duplicates from '0' Explicit APIs and '13' Implicit APIs to produce '13' APIs 2021-07-09 16:38:06,434 | 13 APIs found in the template 2021-07-09 16:38:06,444 | Mounting f7 at http://127.0.0.1:4000/f1 [POST] 2021-07-09 16:38:06,444 | Mounting f8 at http://127.0.0.1:4000/f2 [POST] 2021-07-09 16:38:06,444 | Mounting f13 at http://127.0.0.1:4000/f3 [POST] 2021-07-09 16:38:06,444 | Mounting f4 at http://127.0.0.1:4000/f4 [POST] 2021-07-09 16:38:06,444 | Mounting f5 at http://127.0.0.1:4000/f5 [POST] 2021-07-09 16:38:06,444 | Mounting f10 at http://127.0.0.1:4000/f6 [POST] 2021-07-09 16:38:06,444 | Mounting f2 at http://127.0.0.1:4000/f7 [POST] 2021-07-09 16:38:06,444 | Mounting f1 at http://127.0.0.1:4000/f8 [POST] 2021-07-09 16:38:06,444 | Mounting f3 at http://127.0.0.1:4000/f9 [POST] 2021-07-09 16:38:06,444 | Mounting f12 at http://127.0.0.1:4000/f10 [POST] 2021-07-09 16:38:06,474 | Mounting f9 at http://127.0.0.1:4000/f11 [POST] 2021-07-09 16:38:06,474 | Mounting f11 at http://127.0.0.1:4000/f12 [POST] 2021-07-09 16:38:06,474 | Mounting f6 at http://127.0.0.1:4000/f13 [POST] 2021-07-09 16:38:06,474 | You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. You only need to restart SAM CLI if you update your AWS SAM template 2021-07-09 16:38:06,474 | Localhost server is starting up. Multi-threading = True 2021-07-09 16:38:06 * Running on http://127.0.0.1:4000/ (Press CTRL+C to quit)
And If I try to use `--warn-containers LAZY` the image building time when single function is invoked is still high.
I tried to reproduce it locally again with 15 nodejs14 functions but still didn't encounter the long image build time.
It seems the warning Connection pool is full, discarding connection: localhost
might be related. Can you try some of the solution in this post?
If the issue still persists, can you tell me more about your
Closing given no response. If you are still encountering this, please create a new issue (closed issues are hard to track)
I was trying to run aws sam in my local environment using the following command:
this is what I see in the log
So I have implemented 10 api (10 lambdas) but the initialization time to build the containers is about 7 minutes.
Noderuntime: node14.x SAM CLI, version 1.23.0
Any advise to improve build time of lambda function containers? Thanks in advance.