Ao inserir o código que vai de fato incluir e excluir no banco, estou tomando erro de permissão porém já conferi minhas políticas e roles e não encontro o erro.
[ERROR] ClientError: An error occurred (AccessDeniedException) when calling the DeleteItem operation: User: arn:aws:sts::xxxxx:assumed-role/IzaCollection_Arquivos_S3_Atualiza_DynamoDB-role-iz41l49n/IzaCollection_Arquivos_S3_Atualiza_DynamoDB is not authorized to perform: dynamodb:DeleteItem on resource: arn:aws:dynamodb:us-east-1:xxxxx:table/PhotoCollection because no identity-based policy allows the dynamodb:DeleteItem action
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 10, in lambda_handler
main(arquivo,evento)
File "/var/task/lambda_function.py", line 44, in main
atualiza_database(atributos, evento)
File "/var/task/lambda_function.py", line 31, in atualiza_database
response = table.delete_item(
File "/var/runtime/boto3/resources/factory.py", line 520, in do_action
response = action(self, *args, **kwargs)
File "/var/runtime/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(*args, **params)
File "/var/runtime/botocore/client.py", line 391, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/runtime/botocore/client.py", line 719, in _make_api_call
raise error_class(parsed_response, operation_name)