简体   繁体   English

AWS API Gateway生成的SDK不包含客户端js文件

[英]AWS API Gateway Generated SDK does not contain client js file

I have created an API using the AWS Api Gateway Service, and am ready to use the javascript sdk in a simple webpage. 我已经使用AWS Api网关服务创建了API,并准备在简单的网页中使用javascript sdk。

However, the instructions for using the javascript SDK here show an import for a js file called apigClient. 但是, 此处使用javascript SDK的说明显示了一个名为apigClient的js文件的导入。 I can only assume this is where the client class is stored for the api. 我只能假定这是为api存储客户端类的位置。 However, when I generate the SDK for MY API, there is no such file (as in, the older file in the unzipped folder is lib. There is no js file in the root directory.) 但是,当我为MY API生成SDK时,没有这样的文件(例如,解压缩文件夹中的旧文件是lib。根目录中没有js文件。)

Am I expected to create this file on my own? 我是否希望自己创建此文件? If so, I did not see any instructions to do so. 如果是这样,我没有看到任何指示。 Are there? 在那儿? What am I missing here? 我在这里想念什么?

I had the same problem, and I fixed it by deploying API . 我遇到了同样的问题,并且通过部署API进行了修复。

See step4 "Deploy Your API" in this link. 请参阅此链接中的步骤4“部署您的API”。

https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-4/ https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-4/

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM