[[ERROR] ClientError: An error occurred (AccessDenied) when calling the PutObjectTagging operation: Access Denied

0

【以下的问题经过翻译处理】 [ERROR] ClientError: An error occurred (AccessDenied) when calling the PutObjectTagging operation: Access Denied Traceback (most recent call last): File "/var/lang/lib/python3.8/site-packages/aws_lambda_powertools/metrics/metrics.py", line 184, in decorate response = lambda_handler(event, context) File "/var/lang/lib/python3.8/site-packages/aws_lambda_powertools/logging/logger.py", line 354, in decorate return lambda_handler(event, context, *args, **kwargs) File "/var/task/lambda.py", line 75, in lambda_handler set_status(input_bucket, input_key, INPROGRESS) File "/var/task/lambda.py", line 116, in set_status s3_client.put_object_tagging( File "/var/lang/lib/python3.8/site-packages/botocore/client.py", line 508, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/lang/lib/python3.8/site-packages/botocore/client.py", line 915, in _make_api_call raise error_class(parsed_response, operation_name)

有人能帮我解决这个问题吗?

我已经仔细检查了我的 IAM 角色,但无法解决这个问题。

profile picture
专家
已提问 5 个月前83 查看次数
1 回答
0

【以下的回答经过翻译处理】 我的猜测是Lambda角色没有更新对象标签的权限,所以首先要检查这一点。[文档](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html)中有可以为S3创建的各种IAM权限-搜索“PutObjectTagging”。

可能还有存储桶策略拒绝访问的问题。

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则