简体   繁体   English

使用AWS无服务器应用程序模型AWS SAM的适用于Visual Studio Code的AWS Toolkit

[英]AWS Toolkit for Visual Studio Code using the AWS Serverless Application Model AWS SAM

I follow the steps described at Create a Serverless Application with the AWS Toolkit for Visual Studio Code: https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/create-sam.html 我遵循使用适用于Visual Studio Code的AWS工具包创建无服务器应用程序中描述的步骤: https : //docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/create-sam.html

This is step by step building a lambda function with AWS SAM model. 这是逐步使用AWS SAM模型构建lambda函数的步骤。

When I execute the function locally, I got following error message: 在本地执行该功能时,出现以下错误消息:

File "/usr/local/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/botocore/regions.py", line 135, in _endpoint_for_partition raise NoRegionError() botocore.exceptions.NoRegionError: You must specify a region. _endpoint_for_partition中的文件“ /usr/local/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/botocore/regions.py”,第135行,引发NoRegionError()botocore.exceptions .NoRegionError:您必须指定一个区域。

I have the AWS Toolkit for Visual Studio Code extension installed and I can connect to any region using AWS Explorer 我已经安装了适用于Visual Studio Code的AWS Toolkit扩展,并且可以使用AWS Explorer连接到任何区域

Any help appretiated! 任何帮助表示赞赏!

I realized that I have not configured aws for access keys and default region 我意识到我尚未为访问密钥和默认区域配置AWS

On Terminal screen, you can execute 在终端屏幕上,您可以执行

aws configure

command and provide information requested 命令并提供所需的信息

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

相关问题 AWS 无服务器应用程序模型 (SAM) — 如何更改 StageName? - AWS Serverless Application Model (SAM) -- How do I change StageName? 通过 Visual Studio 发布 AWS 无服务器应用程序 - AWS Serverless Application Publish via Visual Studio 为 Visual Studio 代码配置 AWS 工具包 - Configure AWS toolkit for Visual Studio code Visual Studio Code AWS Toolkit - 如何使用联合登录进行连接 - - Visual Studio Code AWS Toolkit - How to connect using federated login - 使用 Visual Studio 工具包检索 AWS 机密 - Retrieving AWS secrets using Visual Studio toolkit 在 Visual Studio 2019 中使用 AWS Toolkit for LocalStack? - Using AWS Toolkit in Visual Studio 2019 for LocalStack? AWS SAM(无服务器应用程序模型)和无服务器框架有什么区别? - What's the difference between AWS SAM (Serverless Application Model) and serverless framework? 如何在AWS Lambda上的无服务器应用程序中存储和使用HTML模板(使用AWS SAM)? - How to store and use HTML templates in serverless application on AWS Lambda (using AWS SAM)? 如何在 Visual Studio Code 上使用 Python 设置 AWS SAM 本地调试? - How to setup AWS SAM local debugging with Python on Visual Studio Code? 无法使用AWS Eclipse工具包调试AWS SAM项目 - Unable to debug aws-sam project using aws eclipse toolkit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM