首页 > 解决方案 > 通过 TaskCat 拒绝访问 S3

问题描述

我想使用 Taskcat 进行部署。一切都很好,除了(一如既往)权限。我为我的模板创建了一个存储桶,它在配置文件中被引用。我打电话taskcat test run,在模板上传到我的存储桶后,我收到一个错误,stack creation失败是由于 S3 error: Access Denied.

由于我可以通过 TaskCat 上传模板,因此我的帐户具有正确的权限。我是否需要添加存储桶权限,Cloudformation 才能访问该存储桶?

错误代码:

 _            _             _   
| |_ __ _ ___| | _____ __ _| |_ 
| __/ _` / __| |/ / __/ _` | __|
| || (_| \__ \   < (_| (_| | |_ 
 \__\__,_|___/_|\_\___\__,_|\__|
                                

version 0.9.23
[WARN   ] : ---
[WARN   ] : Linting detected issues in: mypath/template.yml
[WARN   ] :     line 14 [2001] [Check if Parameters are Used] Parameter AZone3 not used.
[INFO   ] : Will not delete bucket created outside of taskcat task-cat-bucket
[ERROR  ] : ClientError An error occurred (ValidationError) when calling the CreateStack operation: S3 error: Access Denied
For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
Exception ignored in: <function Pool.__del__ at 0x7f9593cec790>
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 268, in __del__
    self._change_notifier.put(None)
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 368, in put
    self._writer.send_bytes(obj)
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 411, in _send_bytes
    self._send(header + buf)
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor
Exception ignored in: <function Pool.__del__ at 0x7f9593cec790>
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 268, in __del__
    self._change_notifier.put(None)
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 368, in put
    self._writer.send_bytes(obj)
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 411, in _send_bytes
    self._send(header + buf)
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

标签: amazon-web-servicesamazon-s3amazon-cloudformation

解决方案


当您CloudFormation Stack通过控制台启动时,您登录的用户,其凭据将用于所有操作。

当您说您可以上传到 S3 存储桶时,并不直接转换为您也可以下载对象。

因此,如果您具有操作的必要权限,请检查您配置的凭据。


推荐阅读