AWS CodeCommit 活跃用户如何运作?

How do AWS CodeCommit active users really works?

尽管有 AWS CodeCommit 文档和常见问题解答,但我不明白活跃用户是如何定义的以及他们是如何收费的。如果我们去FAQs,我们可能会发现:

Q: What is the definition of an active user in AWS CodeCommit?

An active user is any unique AWS identity (IAM user/role, federated user, or root account) that accesses AWS CodeCommit repositories during the month, either through Git requests or by using the AWS Management Console. A server accessing CodeCommit using a unique AWS identity counts as an active user.

Q: Which Git requests are considered towards the monthly allowance?

A Git request includes any push or pull that transmits repository objects. The request does not count towards your Git request allowance if there is no object transfer due to local and remote branches being up-to-date.

不过,我还是有些疑惑。

  1. 用户访问 CodeCommit 需要多长时间才能成为活跃用户?如果我在第一个月只访问 5、10、15 或 25 天,之后不再访问,我会是那个月的活跃用户吗?如果我每个月访问一天,我是活跃用户吗?

  2. 如果我创建一个不执行“请求包括任何传输存储库对象的推送或拉取”的 Lambda,例如,我使用 SDK 仅调用 ListPullRequests 操作,那么将我被收费了?

How much time does a user need to access CodeCommit to be an active user?

只需调用以下任何一个 CodeCommit API 就足以使唯一 role/user 成为活跃用户。

  • GetBranch[1]
  • Git拉[2]
  • Git推送[2]

If I access only 5, 10, 15 or 25 days in the first month and after don't access anymore, I'd be an active user on that month?

If I access one day each month, am I an active user?

另请注意,前 5 名活跃用户的 CodeCommit 定价为 0 美元,提供无限制的存储库、每月 50 GB 的存储空间、10,000 Git requests/month 以及超过每个额外的活跃用户前 5 个,AWS CodeCommit 的费用为每位活跃用户每月 1 美元。对于每位活跃用户,您的帐户每月都会获得 10 GB 的额外存储空间和当月 2,000 Git 次请求。未使用的存储限额和 Git 请求不会结转至以后的月份。

If I create a Lambda which doesn't perform "requests includes any push or pull that transmits repository objects", for instance, I call only ListPullRequests action using SDK, then will I be charged?

是的,这次通话不收费。正如所强调的那样,Git 请求包括传输存储库对象的任何推送或拉取。如果由于本地和远程分支机构是最新的而没有对象传输,则该请求不计入您的 Git 请求限额。

参考:

[1] https://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetBranch.html

[2]https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-permissions-reference.html#aa-git