[英]CodeBuild (AWS) from CodePipeline (AWS) is not working
我已經從代碼管道向導創建了一個代碼構建項目,其中包含所有必需的選項和有效的IAM角色。 我還添加了IAM角色策略,這是訪問和寫入S3存儲桶中的數據所必需的。 我已經考慮過訪問S3的下面提到的政策。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Resource": [
"arn:aws:logs:aws/codebuild",
"arn:aws:logs:aws/codebuild:*"
],
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
]
},
{
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::pipeline”,
"arn:aws:s3::: pipeline/*"
],
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:GetObjectVersion",
"s3:GetBucketAcl",
"s3:GetBucketLocation"
]
}
]
}
一旦我啟動了一個管道,代碼構建就失敗了,我得到了下面提到的錯誤
DOWNLOAD_SOURCE Failed:
CLIENT_ERROR: symlink /codebuild/output/.../libcrypto.1.0.0.dylib: no such file or directory for primary source and source version arn:aws:s3:::codepipeline-bucketSource/Ap4g3sv.zip
我已經研究了很多,已經通過各種AWS文檔但是找不到解決方案。
經過大量研究后,我發現這只是一個許可問題。 我不得不改變下面提到的政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"*"
],
"Effect": "Allow"
},
{
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:GetObjectVersion",
"s3:GetBucketAcl",
"s3:GetBucketLocation"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
]
}
添加此修改后,我的代碼構建和管道開始工作。
看起來您的策略僅提供對“管道”存儲桶的訪問權限,但不提供對“codepipeline-bucketSource”的訪問權限。 您是否可以嘗試至少暫時讓S3完全訪問該角色,以便我們可以調試這是否實際上是與訪問相關的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.