Question:
I need to do some grouping job from a Source DynamoDB table, then write each resulting Item to another Target DynamoDB table (or a secondary index of the Source one).
Here I see that DynamoDB can be used as a Source (as well as reported in Connection Types).
However, it’s not clear to me if a DynamoDB table can be used as Target as well.
Note: each resulting grouping item must be written into a separate DynamoDB Item (i.e., if there are X objects resulting from grouping, X Items must be written to Target DynamoDB table).
Answer:
Glue can now read and write to DynamoDB. The option to write is not available via the console, but can be done by editing the script.
Example:
1 2 3 4 5 6 7 8 9 |
Datasink1 = glueContext.write_dynamic_frame_from_options( frame=ApplyMapping_Frame1, connection_type="dynamodb", connection_options={ "dynamodb.output.tableName": "myDDBTable", "dynamodb.throughput.write.percent": "1.0" } ) |
As per: