[[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
EXPERT
asked 6 months ago111 views
1 Answer
0

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

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

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions