简体   繁体   English

如何在不扫描 lambda function 的情况下从 dynamo db 中获取所有项目

[英]How to fetch all items from dynamo db without scan in lambda function

I'm trying to fetch all items from dynamoDB table, But issue is administrator has not added permission of Scan in roles assigned to me, is there any alternative to scan method, I looked into aws wrangler library but aws wrangler does not have any method for get items.我正在尝试从 dynamoDB 表中获取所有项目,但问题是管理员没有在分配给我的角色中添加扫描权限,是否有任何替代扫描方法的方法,我查看了aws wrangler 库,但 aws wrangler 没有任何方法获取物品。 Error I got when I run table.scan() :运行table.scan()时出现错误:

An error occurred (AccessDeniedException) when calling the scan operation: User: arn:aws:sts::xxxxx:assumed-role. xxxxxxxx/xxxxx-lambdafunction is not authorized to perform: dynamodb:Scan

As table contain 1000s of data so I need to use pagination, so is there any alternate of scan or any way around using aws wrangelr to fetch all tables data由于表包含 1000 条数据,所以我需要使用分页,所以是否有任何替代扫描或使用 aws wrangelr 获取所有表数据的任何方法

I would suggest that you talk with your administrator and provide the reason why you need Scan, you may be breaking company policy.我建议您与您的管理员交谈并提供您需要扫描的原因,您可能违反了公司政策。

You can use PartiQL ExecuteStatement API which will fetch all of the data in the table.您可以使用 PartiQL ExecuteStatement API,它将获取表中的所有数据。 But again, I advise you talk with your admin.但同样,我建议您与您的管理员交谈。

https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ExecuteStatement.html https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ExecuteStatement.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在没有全表扫描的情况下在 Dynamo DB 中随机抽样大小 N - Random Sampling of size N in Dynamo DB without full Table scan 使用查询(python boto3)从 Dynamo DB 表中获取所有记录 - Fetch all the records from Dynamo DB table using Query (python boto3) 如何在 AWS-lambda 中使用 nodeJS 对 dynamo DB 中的数据进行排序 - How to sort data from dynamo DB using nodeJS in AWS-lambda 如何将发电机数据库记录放在 SQS 队列中以触发 lambda - How to place dynamo db records in a SQS queue to trigger lambda 使用过滤器表达式从 dynamo 数据库查询返回固定数量的项目 - Return fixed number of items from dynamo db query with filter expression AWS Dynamo DB:如何在没有 GSI 的情况下进行有效设计 - AWS Dynamo DB: how to design effectively without GSI 在 Lambda 函数中引用现有的 Dynamo DB - Referring to existing Dynamo DB in Lambda functions 将 Lambda 与 NodeJS 一起使用并从 Dynamo 数据库正确获取值,我无法处理收到的 json 数据 - Using Lambda with NodeJS and fetching value correctly from Dynamo db, I cannot process the json data recieved 如何将 dynamo db 与 laravel 一起使用? - how to use dynamo db with laravel? 如何将 Sam 与 lambda 和发电机一起使用并放大? - How to use Sam with lambda and dynamo and amplify?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM