我正在尝试使用yum-s3-plugin插件在名为s3-rpm-repo的aws s3存储桶上创建私有yum存储库。我有一位拥有以下政策的专用用户:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1417601934000",
"Effect": "Allow",
"Action": [
"s3:GetBucketAcl",
"s3:GetBucketLocation",
"s3:GetBucketPolicy",
"s3:GetBucketTagging",
"s3:GetBucketVersioning",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:ListAllMyBuckets",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::s3-rpm-repo"
]
},
{
"Sid": "Stmt1417602286000",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": [
"arn:aws:s3:::*"
]
},
{
"Sid": "Stmt1417602331000",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl"
],
"Resource": [
"arn:aws:s3:::s3-rpm-repo/*"
]
}
]
}
我已经安装了插件和python-boto。以下是yum存储库设置:
[ss-s3-rpm-repo]
name=ss-s3-rpm-repo
baseurl=http://s3-rpm-repo.s3.amazonaws.com/amzn/$basearch
gpgcheck=0
priority=1
s3_enabled=1
debuglevel=10
logfile=/tmp/yum.log
key_id=AKIA...7WTQ
secret_key=X65...F
但是当我尝试更新存储库时,我收到错误:
[root@s3yum tmp]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, s3, security
Loading mirror speeds from cached hostfile
* base: centos-mirror.jchost.net
* extras: mirror.thelinuxfix.com
* updates: mirror.vcu.edu
ss-s3-rpm-repo - amzn/x86_64/
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 136, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 434, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1230, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1008, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 830, in _getFile
size=size
File "/usr/lib/yum-plugins/s3.py", line 173, in urlgrab
key = self._key(key_name)
File "/usr/lib/yum-plugins/s3.py", line 165, in _key
return bucket.get_key(key_name)
File "/usr/lib/python2.6/site-packages/boto/s3/bucket.py", line 192, in get_key
key, resp = self._get_key_internal(key_name, headers, query_args_l)
File "/usr/lib/python2.6/site-packages/boto/s3/bucket.py", line 234, in _get_key_internal
response.status, response.reason, '')
boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
之前是否有人遇到过相同或类似的错误? 感谢任何提示。