Skip to content

This is a sample project to demonstrate how to update DynamoDB with AWS Glue

Notifications You must be signed in to change notification settings

jjeanjacques10/update-dynamodb-glue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Update DynamoDB with AWS Glue

This is a sample project to demonstrate how to update DynamoDB with AWS Glue. On this table there are no one pokemon category, so we need to filter the data and update each row with the correct category from the pokemon API.

number name
1 Bulbasaur
2 Ivysaur
3 Venusaur
4 Charmander
5 Charmeleon
6 Charizard

How to run

1. Create a DynamoDB table

Create a DynamoDB table with the following schema.

field description
number The pokemon number
name The pokemon name

2. Create Role

Create a role with the following permissions to access DynamoDB and S3.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "glue.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}

Add policies:

  • DynamoDBFullAccess
  • S3FullAccess

3. Create a Glue job

Create a Glue job with the following settings.

  • Job type: Spark
  • Job language: Python
  • Glue version: 3.0
  • Number of workers: 2

4. Run the Glue job on AWS Console

5. Check the DynamoDB table

You can see the following records in the DynamoDB table.

number name category
1 Bulbasaur grass
2 Ivysaur grass
3 Venusaur grass
4 Charmander fire
5 Charmeleon fire
6 Charizard fire

References


Developed by Jean Jacques Barros

About

This is a sample project to demonstrate how to update DynamoDB with AWS Glue

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages