AWSCLI可以在自定义图像上运行的AWS CodeBuild buildspec中使用吗?

发布于 2025-01-31 16:59:31 字数 344 浏览 4 评论 0原文

如果代码构建项目在已预装AWSCLI的自定义映像上运行,但未为该AWS帐户配置,那么在该项目的buildspec中是否仍然可以在不先更新其AWS凭据的情况下运行aws *

换句话说,这些凭据是否由CodeBuild提供(例如,通过自动拾取环境变量提供此信息),或者如果我使用自定义图像,则可以明确处理该信息,并且>>>>>>>>>>>> AWS *仅有望在buildspec开箱即用的情况下工作,而无需在CodeBuild托管图像上进行其他努力?

(我的意思是帐户的配置/凭据和角色,所讨论的代码建筑项目在其中运行)

If a Codebuild project runs on a custom image that has awscli preinstalled, but not configured for that AWS account, would it be still possible to run aws * in that project's buildspec without updating its AWS credentials there first?

In other words, are these credentials made available by Codebuild (e.g. via providing this information in automatically picked up environment variables) , or if I am using a custom image, it is up to me to take care of that explicitly, and aws * is only expected to work in buildspec out of the box without additional efforts on Codebuild managed images?

(I mean configuration/credentials for the account and role the Codebuild project in question operates in)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一人独醉 2025-02-07 16:59:31

当您在AWS CodeBuild项目中附上IAM服务角色时,您无需配置AWS CLI。 IAM服务角色是环境配置的一部分,每当您尝试访问AWS中的资源时,都会假设此角色。对于AWS CodeBuild的自定义映像也是如此。

When you attach an IAM service role with your AWS Codebuild project, you don't need to configure AWS cli. IAM service role is part of environment configuration and this role will be assumed whenever you try to access resources in AWS. This goes same for your custom image for AWS Codebuild as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文