Working with the AWS SDK in Managed Service for YDB. Overview
This section describes how to write simple programs in several programming languages using the AWS SDK to perform the following operations in YDB:
- Creating tables and loading JSON data in the table.
- Managing records in a table: adding, reading, updating, and deleting data.
- Searching and retrieving data.
- Deleting a table.
Getting started
-
Prepare the Document API endpoint of your database.
Where to find the Document API endpoint of a database
-
Navigate to the management console
. -
Select the folder and go to Managed Service for YDB.
-
Select the database you want to query.
-
In the menu on the left, go to the Overview section.
-
The Document API endpoint line shows the endpoint value.
Here is an example of an endpoint value:
https://docapi.serverless.yandexcloud.net/ru-central1/b1gia87mbaomkfvs6rgl/etnudu2n9ri35luqe4h1
Note
For the Amazon DynamoDB compatibility mode, use a serverless database configuration.
-
Environment setup
Configure the environment for your programming language:
The examples in the section on building Java applications use Apache Maven
For more information about the AWS SDK for Java, see this AWS guide
-
Install
Python 3.8 or higher. -
Install the Boto3 library:
pip install boto3For more information about the AWS SDK for Python (Boto), see this AWS guide
.
- Install PHP
. - Configure the AWS SDK for PHP
.
For more information about the AWS SDK for PHP, see this AWS guide
- Install Node.js
. - Install the AWS SDK for Node.js
.
For more information about the AWS SDK for Node.js, see this AWS guide
- Install Ruby
. - Install the AWS SDK for Ruby
.
For more information about the AWS SDK for Ruby, see this AWS guide