Skip to content

Commit

Permalink
Merge pull request #123 from aliyun/tanhehe/add_permission_and_access…
Browse files Browse the repository at this point in the history
…_denied_faq

add permission and access denied faq
  • Loading branch information
muxiangqiu authored Dec 29, 2018
2 parents 37d43cd + 534c3b0 commit 84b0a92
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
16 changes: 15 additions & 1 deletion docs/usage/faq-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@

## Fun Deploy

## FCINVALIDArgumentError: PUT /services/xxxxx failed with 400. requestId: xxxxx, message: VSwitch 'xxxxx' does not exist in VPC 'xxxxx'. The VSwith may not exist or the service role does not have 'vpc:DescribeVSwitchAttributes` permission.
### NoPermissionError: You are not authorized to do this action. Resource: acs:ram:*:xxxxxxxxxx:role/* Action: ram:GetRole

这个问题是由于通过子用户执行 `fun deploy`,但是没有给该子用户配置 AliyunRAMFullAccess 权限导致的。

解决方法:为子用户配置 AliyunRAMFullAccess 的权限或者使用主账户 ak。

### FCAccessDeniedError: GET /services/localdemo failed with 403. requestid: a73f4640-0c8d-958c-c248-db0cc70d834e, message: The service or function doesn't belong to you

这个问题发生在 fun deploy 时配置的 accountId 与 accessKeyId 不匹配:

![](https://tan-blog.oss-cn-hangzhou.aliyuncs.com/img/20181229150556.png)

有可能是写成了其他人的 accountId,也有可能是将登录名误认为是 accountId。

### FCINVALIDArgumentError: PUT /services/xxxxx failed with 400. requestId: xxxxx, message: VSwitch 'xxxxx' does not exist in VPC 'xxxxx'. The VSwith may not exist or the service role does not have 'vpc:DescribeVSwitchAttributes` permission.

这个问题发生在使用 `fun deploy` 部署配置了 vpc 的函数:

Expand Down
14 changes: 14 additions & 0 deletions docs/usage/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@

## Fun Deploy

### NoPermissionError: You are not authorized to do this action. Resource: acs:ram:*:xxxxxxxxxx:role/* Action: ram:GetRole

This problem is caused by executing `fun deploy` through the sub-user withouting grant the AliyunRAMFullAccess permission for sub-user.

The solution is to grant the AliyunRAMFullAccess permission for the sub-user or use the primary account ak.

### FCAccessDeniedError: GET /services/localdemo failed with 403. requestid: a73f4640-0c8d-958c-c248-db0cc70d834e, message: The service or function doesn't belong to you

This problem occurs when fun deploy is configured with an accountId that does not match the accessKeyId:

![](https://tan-blog.oss-cn-hangzhou.aliyuncs.com/img/20181229150556.png)

It is possible to write someone else's accountId or mistake the username for accountId.

### FCInvalidArgumentError: PUT /services/xxxxx failed with 400. requestId: xxxxx, message: VSwitch 'xxxxx' does not exist in VPC 'xxxxx'. The VSwith may not exist or the service role does not have 'vpc:DescribeVSwitchAttributes` permission.

This problem occurs when deploying vpc with `fun deploy`:
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const inquirer = require('inquirer');
const path = require('path');
const yaml = require('js-yaml');
const util = require('util');
const mkdirp = require('mkdirp');
const mkdirp = require('mkdirp-promise');

const getProfile = require('../profile').getProfileFromFile;

Expand Down
2 changes: 1 addition & 1 deletion test/profile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const util = require('util');

const expect = require('expect.js');
const yaml = require('js-yaml');
const mkdirp = require('mkdirp');
const mkdirp = require('mkdirp-promise');
const rimraf = require('rimraf');

const getProfile = require('../lib/profile').getProfile;
Expand Down

0 comments on commit 84b0a92

Please sign in to comment.