python/example_code/dynamodb/README.md
Shows how to use the AWS SDK for Python (Boto3) to work with Amazon DynamoDB.
<!--custom.overview.start--> <!--custom.overview.end-->DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.
For prerequisites, see the README in the python folder.
Install the packages required by these examples by running the following in a virtual environment:
python -m pip install -r requirements.txt
ListTables)Code examples that show you how to perform the essential operations within a service.
Code excerpts that show you how to call individual service functions.
Code examples that show you how to accomplish a specific task by calling multiple functions within the same service.
This example shows you how to get started using DynamoDB.
python hello/hello_dynamodb.py
This example shows you how to do the following:
Start the example by running the following at a command prompt:
python GettingStarted/scenario_getting_started_movies.py
This example shows you how to do the following:
Start the example by running the following at a command prompt:
python TryDax/01-create-table.py
To run the scripts with the DAX client, you must run them on an Amazon Elastic Compute
Cloud (Amazon EC2) instance within your virtual private cloud (VPC). This process is
described in the Python sample application tutorial in the
Developing with the DAX Client
section of the Amazon DynamoDB Developer Guide.
The tutorial shows you how to set up the following additional resources:
On an EC2 instance, run the get item, query, and scan test scripts with the DAX client by specifying a DAX cluster endpoint as the first positional argument. To run the query test script with the DAX client, run the following from a command prompt window. Start the example by running the following at a command prompt:
python 04-query-test.py YOUR-CLUSTER-NAME.111111.clustercfg.dax.usw2.cache.amazonaws.com:8111
This example shows you how to create a REST API that simulates a system to track daily cases of COVID-19 in the United States, using fictional data.
<!--custom.scenario_prereqs.cross_ApiGatewayDataTracker.start--> <!--custom.scenario_prereqs.cross_ApiGatewayDataTracker.end--> <!--custom.scenarios.cross_ApiGatewayDataTracker.start--> <!--custom.scenarios.cross_ApiGatewayDataTracker.end-->This example shows you how to create an AWS Step Functions messenger application that retrieves message records from a database table.
<!--custom.scenario_prereqs.cross_StepFunctionsMessenger.start--> <!--custom.scenario_prereqs.cross_StepFunctionsMessenger.end--> <!--custom.scenarios.cross_StepFunctionsMessenger.start--> <!--custom.scenarios.cross_StepFunctionsMessenger.end-->This example shows you how to create a web application that tracks work items in an Amazon DynamoDB table and uses Amazon Simple Email Service (Amazon SES) (Amazon SES) to send reports.
<!--custom.scenario_prereqs.cross_DynamoDBDataTracker.start--> <!--custom.scenario_prereqs.cross_DynamoDBDataTracker.end--> <!--custom.scenarios.cross_DynamoDBDataTracker.start--> <!--custom.scenarios.cross_DynamoDBDataTracker.end-->This example shows you how to create a chat application that is served by a websocket API built on Amazon API Gateway.
<!--custom.scenario_prereqs.cross_ApiGatewayWebsocketChat.start--> <!--custom.scenario_prereqs.cross_ApiGatewayWebsocketChat.end--> <!--custom.scenarios.cross_ApiGatewayWebsocketChat.start--> <!--custom.scenarios.cross_ApiGatewayWebsocketChat.end-->This example shows you how to do the following:
Start the example by running the following at a command prompt:
python partiql/scenario_partiql_batch.py
This example shows you how to do the following:
Start the example by running the following at a command prompt:
python partiql/scenario_partiql_single.py
This example shows you how to create an AWS Lambda function invoked by Amazon API Gateway.
<!--custom.scenario_prereqs.cross_LambdaAPIGateway.start--> <!--custom.scenario_prereqs.cross_LambdaAPIGateway.end--> <!--custom.scenarios.cross_LambdaAPIGateway.start--> <!--custom.scenarios.cross_LambdaAPIGateway.end-->This example shows you how to create an AWS Lambda function invoked by an Amazon EventBridge scheduled event.
<!--custom.scenario_prereqs.cross_LambdaScheduledEvents.start--> <!--custom.scenario_prereqs.cross_LambdaScheduledEvents.end--> <!--custom.scenarios.cross_LambdaScheduledEvents.start--> <!--custom.scenarios.cross_LambdaScheduledEvents.end-->⚠ Running tests might result in charges to your AWS account.
To find instructions for running these tests, see the README
in the python folder.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0