A super basic example to get you started pushing things to DynamoDB.

Read your AWS credentials from OS enviroment variables and push an items to the DynamoDB tables as key:value.

import boto3
import os

KEY="test_key"
VALUE="test_value"
YOUR_TABLE="test_table"

# Read your credentials from OS environment variables
ACCESS_KEY = os.environ['AWS_ACCESS_KEY_ID']
SECRET_KEY = os.environ['AWS_SECRET_ACCESS_KEY']

# Create client
client = boto3.resource(
    'dynamodb',
    aws_access_key_id=ACCESS_KEY,
    aws_secret_access_key=SECRET_KEY,
)

# Push content to table
table = client.Table(YOUR_TABLE)
table.put_item(TableName=YOUR_TABLE, Item={KEY: VALUE})

Keep reading