marszhong

Results 14 comments of marszhong

![image](https://user-images.githubusercontent.com/33776415/127426848-6ef8a54d-300f-4f65-8d1c-c58f132c5098.png)

`midway-bin package` 打包支持 `aws` 吗? 我看到有这个库: [serverless-aws-starter](https://www.npmjs.com/package/@midwayjs/serverless-aws-starter),应该怎么使用?

有个项目是 midway+eggjs,已经部署在aliyun FC。现在想在 aws 也部署一套,有什么好办法吗?

provider 是 aws 时打包产物没有 starter。打包 aliyun 时是有 starter 的。 ```yml service: cloud-service ## 应用发布到云平台的名字 provider: name: aws ## 发布的云平台,aliyun,tencent 等 aggregation: ## 对 HTTP 函数使用聚合模式部署 cloud-server: ## 部署的函数名 deployOrigin: false...

aliyun 打包时的 starter 如下,aws 打包时没有该文件。 ![image](https://user-images.githubusercontent.com/33776415/185277945-3a73ed6d-e67b-4b73-a74d-488dcd5b67c4.png)

> 可以把 serverless-aws-starter 写在依赖里装上。 写上了,还是没有生成 `cloud-server.js`。 下图是 aliyun 打包时自动生成的入口文件 `cloud-server.js`,里面会依赖对应 starter 做启动处理。 ![image](https://user-images.githubusercontent.com/33776415/185279717-2e212a59-8362-40e5-8208-394d758247d3.png)

用生成的入口文件在 aws 执行不了。入口文件的模版是不是不支持 aws? ![image](https://user-images.githubusercontent.com/33776415/185387779-b00f3c46-4c5c-4360-9a16-3493994cfad7.png) aws上没有这个ctx,也拿不到path去做路由匹配。 ![image](https://user-images.githubusercontent.com/33776415/185388070-6ac85912-eefd-4a95-a3a2-9726fc9994f4.png)

https://github.com/zomixi/midway-app 不知道怎么搞了,感觉目前对 aws 支持比较弱,只能换个框架去做吗?

> https://github.com/zomixi/midway-app > > 不知道怎么搞了,感觉目前对 aws 支持比较弱,只能换个框架去做吗? 这个 demo 在 aliyun fc 能成功部署并正常运行。aws 就不行。感觉应该还是 starter 有点问题。

> Hi @zomixi , I can not see your page, could you provide a reproduce on [stackblitz.com](https://stackblitz.com) ? https://stackblitz.com/edit/angular-hqejv4