Bug: sam deploy - ValueError #6267
Labels
area/deploy
sam deploy command
blocked/close-if-inactive
Blocked for >14 days with no response, will be closed if still inactive after 7 days
blocked/more-info-needed
More info is needed from the requester. If no response in 14 days, it will become stale.
Description:
Executed: sam deploy --guided
Steps to reproduce:
using CloudShell
Observed result:
[cloudshell-user@ip-10-138-183-200 chimeMeeting]$ sam deploy --guided --debug
2023-11-14 21:08:47,492 | Config file location: /home/cloudshell-user/environment/chimeMeeting/samconfig.toml
2023-11-14 21:08:47,499 | Loading configuration values from [default.['deploy'].parameters] (env.command_name.section) in config file at '/home/cloudshell-user/environment/chimeMeeting/samconfig.toml'...
2023-11-14 21:08:47,513 | Configuration values successfully loaded.
2023-11-14 21:08:47,515 | Configuration values are: {'stack_name': 'chimeMeeting', 'capabilities': 'CAPABILITY_IAM', 'confirm_changeset': True, 'resolve_s3': True}
2023-11-14 21:08:47,536 | Using SAM Template at /home/cloudshell-user/environment/chimeMeeting/.aws-sam/build/template.yaml
2023-11-14 21:08:47,582 | Using config file: samconfig.toml, config environment: default
2023-11-14 21:08:47,583 | Expand command line arguments to:
2023-11-14 21:08:47,585 | --guided --template_file=/home/cloudshell-user/environment/chimeMeeting/.aws-sam/build/template.yaml --fail_on_empty_changeset --confirm_changeset --on_failure=ROLLBACK --stack_name=chimeMeeting --resolve_s3 --capabilities=['CAPABILITY_IAM']
2023-11-14 21:08:48,229 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction
2023-11-14 21:08:48,231 | There is no customer defined id or cdk path defined for resource ApplicationResourceGroup, so we will use the resource logical id as the resource id
2023-11-14 21:08:48,233 | There is no customer defined id or cdk path defined for resource ApplicationInsightsMonitoring, so we will use the resource logical id as the resource id
Configuring SAM deploy
2023-11-14 21:09:04,888 | No Parameters detected in the template
2023-11-14 21:09:04,924 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction
2023-11-14 21:09:04,925 | There is no customer defined id or cdk path defined for resource ApplicationResourceGroup, so we will use the resource logical id as the resource id
2023-11-14 21:09:04,927 | There is no customer defined id or cdk path defined for resource ApplicationInsightsMonitoring, so we will use the resource logical id as the resource id
2023-11-14 21:09:04,929 | There is no customer defined id or cdk path defined for resource ServerlessRestApi, so we will use the resource logical id as the resource id
2023-11-14 21:09:04,932 | 0 stacks found in the template
#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
Confirm changes before deploy [Y/n]: N
#SAM needs permission to be able to create roles to connect to the resources in your template
Allow SAM CLI IAM role creation [Y/n]: Y
#Preserves the state of previously provisioned resources when an operation fails
Disable rollback [y/N]: N
2023-11-14 21:09:27,583 | No Parameters detected in the template
2023-11-14 21:09:27,621 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction
2023-11-14 21:09:27,623 | There is no customer defined id or cdk path defined for resource ApplicationResourceGroup, so we will use the resource logical id as the resource id
2023-11-14 21:09:27,626 | There is no customer defined id or cdk path defined for resource ApplicationInsightsMonitoring, so we will use the resource logical id as the resource id
2023-11-14 21:09:27,630 | There is no customer defined id or cdk path defined for resource ServerlessRestApi, so we will use the resource logical id as the resource id
2023-11-14 21:09:27,637 | 4 resources found in the stack
2023-11-14 21:09:27,640 | Found Serverless function with name='HelloWorldFunction' and CodeUri='HelloWorldFunction'
2023-11-14 21:09:27,643 | --base-dir is not presented, adjusting uri HelloWorldFunction relative to /home/cloudshell-user/environment/chimeMeeting/.aws-sam/build/template.yaml
2023-11-14 21:09:27,648 | Detected Inline Swagger definition
2023-11-14 21:09:27,653 | Auth checks done on swagger are not exhaustive!
HelloWorldFunction has no authentication. Is this okay? [y/N]: Y
2023-11-14 21:09:31,912 | 4 resources found in the stack
2023-11-14 21:09:31,915 | Found Serverless function with name='HelloWorldFunction' and CodeUri='HelloWorldFunction'
2023-11-14 21:09:31,918 | --base-dir is not presented, adjusting uri HelloWorldFunction relative to /home/cloudshell-user/environment/chimeMeeting/.aws-sam/build/template.yaml
2023-11-14 21:09:31,921 | No function or layer definition found with code sign config, skipping
Save arguments to configuration file [Y/n]: Y
SAM configuration file [samconfig.toml]: samconfig.toml
SAM configuration environment [default]:
/usr/local/lib/python3.7/site-packages/boto3/compat.py:82: PythonDeprecationWarning: Boto3 will no longer support Python 3.7 starting December 13, 2023. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.8 or later. More information can be found here: https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/
warnings.warn(warning, PythonDeprecationWarning)
2023-11-14 21:09:44,574 | 4 resources found in the stack
2023-11-14 21:09:44,576 | Found Serverless function with name='HelloWorldFunction' and CodeUri='HelloWorldFunction'
2023-11-14 21:09:44,578 | --base-dir is not presented, adjusting uri HelloWorldFunction relative to /home/cloudshell-user/environment/chimeMeeting/.aws-sam/build/template.yaml
2023-11-14 21:09:44,626 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-11-14 21:09:44,653 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-11-14 21:09:44,655 | Unable to find Click Context for getting session_id.
2023-11-14 21:09:44,658 | Sending Telemetry: {'metrics': [{'events': {'requestId': '4735070a-ca4f-40b1-98a0-691426c1a62a', 'installationId': '6a3134fe-b839-4114-8f23-fa5ab78eefda', 'sessionId': 'e45404e6-326e-4b41-a3bd-b33751a51c12', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.7.16',
'samcliVersion': '1.97.0', 'userAgent': 'AWS-CloudShell/2023.09.15', 'commandName': 'sam deploy', 'metricSpecificAttributes': {'events': [{'event_name': 'SamConfigFileExtension', 'event_value': '.toml', 'thread_id': 'ac3c13786b894a9ea0a76bc34d68c812', 'time_stamp': '2023-11-14 21:08:47.492',
'exception_name': None}, {'event_name': 'SamConfigFileExtension', 'event_value': '.toml', 'thread_id': 'eb0ac9f118e24913a8987ab51d569d53', 'time_stamp': '2023-11-14 21:08:48.242', 'exception_name': None}]}}}]}
2023-11-14 21:09:44,655 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': '848943be-0b4c-48f9-a912-d5f6292b72e6', 'installationId': '6a3134fe-b839-4114-8f23-fa5ab78eefda', 'sessionId': 'e45404e6-326e-4b41-a3bd-b33751a51c12', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.7.16',
'samcliVersion': '1.97.0', 'userAgent': 'AWS-CloudShell/2023.09.15', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam deploy', 'metricSpecificAttributes': {'projectType': 'CFN', 'gitOrigin': None, 'projectName':
'a7df3489b0f95d0415f1e4fc7314a228cca6d3ba8422a791f646db935ada038d', 'initialCommit': None}, 'duration': 57043, 'exitReason': 'ValueError', 'exitCode': 255}}]}
2023-11-14 21:09:44,975 | Telemetry response: 200
2023-11-14 21:09:44,979 | Telemetry response: 200
Error: Invalid endpoint: https://sts..amazonaws.com
Traceback:
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/lib/cli_validation/image_repository_validation.py", line 110, in wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/lib/telemetry/metric.py", line 184, in wrapped
raise exception # pylint: disable=raising-bad-type
File "/usr/local/lib/python3.7/site-packages/samcli/lib/telemetry/metric.py", line 149, in wrapped
return_value = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/lib/utils/version_checker.py", line 42, in wrapped
actual_result = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/cli/main.py", line 95, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/commands/_utils/cdk_support_decorators.py", line 39, in wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/commands/_utils/command_exception_handler.py", line 88, in wrapper_command_exception_handler
raise ex
File "/usr/local/lib/python3.7/site-packages/samcli/commands/_utils/command_exception_handler.py", line 68, in wrapper_command_exception_handler
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/samcli/commands/deploy/command.py", line 227, in cli
on_failure,
File "/usr/local/lib/python3.7/site-packages/samcli/commands/deploy/command.py", line 292, in do_cli
guided_context.run()
File "/usr/local/lib/python3.7/site-packages/samcli/commands/deploy/guided_context.py", line 576, in run
self.guided_prompts(_parameter_override_keys)
File "/usr/local/lib/python3.7/site-packages/samcli/commands/deploy/guided_context.py", line 197, in guided_prompts
stack_name, stacks, self.image_repositories, region, managed_s3_bucket, self.s3_prefix
File "/usr/local/lib/python3.7/site-packages/samcli/commands/deploy/guided_context.py", line 363, in prompt_image_repository
manager = CompanionStackManager(stack_name, region, s3_bucket, s3_prefix)
File "/usr/local/lib/python3.7/site-packages/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py", line 55, in init
self._account_id = boto3.client("sts").get_caller_identity().get("Account")
File "/usr/local/lib/python3.7/site-packages/boto3/init.py", line 92, in client
return _get_default_session().client(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/boto3/session.py", line 309, in client
config=config,
File "/usr/local/lib/python3.7/site-packages/botocore/session.py", line 1007, in create_client
auth_token=auth_token,
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 171, in create_client
partition_data,
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 502, in _get_client_args
partition_data,
File "/usr/local/lib/python3.7/site-packages/botocore/args.py", line 148, in get_client_args
proxies_config=new_config.proxies_config,
File "/usr/local/lib/python3.7/site-packages/botocore/endpoint.py", line 402, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
An unexpected error was encountered while executing "sam deploy".
Search for an existing issue:
https://github.com/aws/aws-sam-cli/issues?q=is%3Aissue+is%3Aopen+Bug%3A%20sam%20deploy%20-%20ValueError
Or create a bug report:
https://github.com/aws/aws-sam-cli/issues/new?template=Bug_report.md&title=Bug%3A%20sam%20deploy%20-%20ValueError
Expected result:
Uploading to chimeSdkWorkshop/4d08963eaxxx000xxx54a224d541 549916 / 549916 (100.00%)
Initiating deployment
Uploading to chimeSdkWorkshop/78602e1003eaxxx000xxx56ba10d64ae44e.template 1199 / 1199 (100.00%)
Waiting for changeset to be created..
CloudFormation stack changeset
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.97.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: