Closed buhe closed 6 years ago
确保你提供的 access key 和 secret 能够查询你的 account id 下的 log project 即可,这个是第一步先查询 log project 是否存看是否需要创建的时候被拒绝查询了,后面都无法继续。
权限修改取决于你创建的 access key 和 secret,在官网控制台自己控制。
确实是权限问题,我最后换了主账户的 ak sk ,子账户还没有搞定,目前调通了,还没找到 Region 等参数怎么设置,之前没用过 阿里云,这些最好还是科普一下~ 总体思路很棒 比 fcli 好用多了,那个反人类,还要自己 zip 代码,而且最棒的是 文档没说...
sls-demo-logs 这种怎么生成的 文档中最好能说一下,不然还要翻代码,不说了,先去看你写的代码
SLS_DEBUG=* serverless deploy --region cn-hangzhou
done~
不过有个 bug ,随便这里说吧: 第一次会:
F C Invalid Argument Error -----------------------------
POST /services failed with 400. requestid: xxx, message: project 'sls-xxx-logs' does not exist.
因为 log 还没有创建成功,下一次执行就好了
@buhe
因为 log 还没有创建成功,下一次执行就好了
这是一个 TODO, 参见 https://github.com/aliyun/serverless-aliyun-function-compute/issues/6
Handle the delay of resource creation (esp. LogHub resources)
如果你愿意可以实现并提交 PR,谢谢。
UnauthorizedError: denied by sts or ram, action: log:GetProject, resource: acs:log:cn-shanghai:1700044811950409:project/sls-serverless-aliyun-hello-world-logs
看起来是默认写死了权限配置?这个文档中好像没有描述怎么修改