简体   繁体   English

AWS 圣杯错误。 如何正确输入我的凭据?

[英]AWS chalice error. How do I properly put my credentials in?

Hi I'm trying to access serverless API.嗨,我正在尝试访问无服务器 API。 I got as far as creating virtual environments, activating it and puting my credentials in. Though when I try to deploy aws chalice, this is what i get:我已经创建了虚拟环境,激活它并将我的凭据放入其中。尽管当我尝试部署 aws chalice 时,这就是我得到的:

Creating deployment package.
Traceback (most recent call last):
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\cli\__init__.py", line 599, in main
    return cli(obj={})
  File "c:\users\jerom\desktop\venv\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\jerom\desktop\venv\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\users\jerom\desktop\venv\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\jerom\desktop\venv\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\jerom\desktop\venv\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\jerom\desktop\venv\lib\site-packages\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\cli\__init__.py", line 206, in deploy
    deployed_values = d.deploy(config, chalice_stage_name=stage)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\deploy\deployer.py", line 353, in deploy
    return self._deploy(config, chalice_stage_name)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\deploy\deployer.py", line 364, in _deploy
    plan = self._plan_stage.execute(resources)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\deploy\planner.py", line 139, in execute
    result = handler(resource)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\deploy\planner.py", line 195, in _plan_lambdafunction
    if not self._remote_state.resource_exists(resource):
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\deploy\planner.py", line 61, in resource_exists
    result = handler(resource)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\deploy\planner.py", line 94, in _resource_exists_lambdafunction
    return self._client.lambda_function_exists(resource.function_name)
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\awsclient.py", line 103, in lambda_function_exists
    client = self._client('lambda')
  File "c:\users\jerom\desktop\venv\lib\site-packages\chalice\awsclient.py", line 708, in _client
    self._client_cache[service_name] = self._session.create_client(
  File "c:\users\jerom\desktop\venv\lib\site-packages\botocore\session.py", line 831, in create_client
    client = client_creator.create_client(
  File "c:\users\jerom\desktop\venv\lib\site-packages\botocore\client.py", line 83, in create_client
    client_args = self._get_client_args(
  File "c:\users\jerom\desktop\venv\lib\site-packages\botocore\client.py", line 285, in _get_client_args
    return args_creator.get_client_args(
  File "c:\users\jerom\desktop\venv\lib\site-packages\botocore\args.py", line 99, in get_client_args
    endpoint = endpoint_creator.create_endpoint(
  File "c:\users\jerom\desktop\venv\lib\site-packages\botocore\endpoint.py", line 286, in create_endpoint
    raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: https://lambda.New Jersey.amazonaws.com

does anyone have any idea how to solve this?有谁知道如何解决这个问题?

It would appear that you provided an invalid valid value for "Region" when storing your credentials.在存储凭据时,您似乎为“区域”提供了无效的有效值。

The region name forms part of the URL when connecting to AWS services, which is why your code is trying to access https://lambda.New Jersey.amazonaws.com . The region name forms part of the URL when connecting to AWS services, which is why your code is trying to access https://lambda.New Jersey.amazonaws.com . (New Jersey is not a valid Region.) (新的 Jersey 不是有效的区域。)

To fix:修理:

  • Use the AWS CLI aws configure command to update your credentials.使用 AWS CLI aws configure命令更新您的凭证。
  • In the Region field, provided a region code from the list of AWS Endpoints , such as us-west-2 or eu-west-2 .Region字段中,提供来自AWS Endpoints列表的区域代码,例如us-west-2eu-west-2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决“发生错误(InvalidClientTokenId)”AWS Chalice 部署错误 - how to solve “An error occurred (InvalidClientTokenId)” AWS Chalice deployment error 如何将我的结构放入 Rust 中 AWS Kinesis 的 PutRecordInput? - How do I put my struct into a PutRecordInput for AWS Kinesis in Rust? 如何向Kubernetes提供AWS凭据? - How do I provide AWS credentials to Kubernetes? 如何清除 AWS Configure 中的凭证? - How Do I Clear The Credentials In AWS Configure? AWS CLI - 如何加密凭证 - AWS CLI - How do I encrypt the credentials AWS CloudFormation Transform - 如何正确返回错误消息? - AWS CloudFormation Transform - How do I properly return an error message? 如何在AWS ECS docker容器中获取AWS凭据? - How do I get AWS credentials in the AWS ECS docker container? 部署 Chalice (AWS) 时出现内部服务器错误 - Internal Server Error when deploying Chalice (AWS) 我的 Aws chalice 和 terraform 正在本地机器上使用 tmp 文件夹如何将它们包含在代码库中以进行生产? - my Aws chalice and terraform is using tmp folder on my local machine how to include them in codebase for production? AWS 圣杯如何减少 lamda 部署大小 - AWS chalice how to reduce lamda deployment size
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM