Working with the AWS SDK in Managed Service for YDB. Overview
This section describes how to use the AWS SDK for several programming languages to write simple programs that 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 extracting data.
- Deleting a table.
Getting started
-
Prepare the Document API endpoint of the created database.
How do I find out the Document API endpoint of a database?
-
Go to the management console
. -
Select the folder and go to Managed Service for YDB.
-
Select the DB you want to query.
-
In the menu on the left, go to the Overview section.
-
The endpoint value is in the Document API endpoint line.
Example of an endpoint value:
https://docapi.serverless.yandexcloud.net/ru-central1/b1gia87mbaomkfvs6rgl/etnudu2n9ri35luqe4h1
Note
For the Amazon DynamoDB-compatible mode, use a serverless database configuration.
-
Environment setup
Configure the environment for your programming language:
The examples in the section on building Java applications are based on Apache Maven
To learn more about the AWS SDK for Java, see the AWS documentation
-
Install
Python 3.8 or higher. -
Install the Boto3 library:
pip install boto3
For more information about the AWS SDK for Python (Boto), see the AWS documentation
.
- Install PHP
. - Configure the AWS SDK for PHP
.
To learn more about the AWS SDK for PHP, see the AWS documentation
- Install Node.js
. - Install AWS SDK for Node.js
.
To learn more about the AWS SDK for Node.js, see the documentation
- Install Ruby
. - Install AWS SDK for Ruby
.
To learn more about the AWS SDK for Ruby, see the documentation