AWSCLI可以在自定义图像上运行的AWS CodeBuild buildspec中使用吗?
如果代码构建项目在已预装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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您在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.