awswrangler.dynamodb.put_items¶
- awswrangler.dynamodb.put_items(items: Union[List[Dict[str, Any]], List[Mapping[str, Any]]], table_name: str, boto3_session: Optional[Session] = None) Any ¶
Insert all items to the specified DynamoDB table.
Note
This function has arguments which can be configured globally through wr.config or environment variables:
Check out the Global Configurations Tutorial for details.
- Parameters
items (Union[List[Dict[str, Any]], List[Mapping[str, Any]]]) – List which contains the items that will be inserted.
table_name (str) – Name of the Amazon DynamoDB table.
boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 Session will be used if boto3_session receive None.
- Returns
None.
- Return type
None
Examples
Writing items
>>> import awswrangler as wr >>> wr.dynamodb.put_items( ... items=[{'key': 1}, {'key': 2, 'value': 'Hello'}], ... table_name='table' ... )