-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7dddc1
commit af86eb9
Showing
14 changed files
with
5,875 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<!--Generated by WRITEME on 2023-09-07 15:08:02.300864 (UTC)--> | ||
# DynamoDB code examples for the Command Line Interface with Bash script | ||
|
||
## Overview | ||
|
||
Shows how to use the AWS Command Line Interface with Bash script 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.* | ||
|
||
## ⚠ Important | ||
|
||
* Running this code might result in charges to your AWS account. | ||
* Running the tests might result in charges to your AWS account. | ||
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). | ||
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). | ||
|
||
<!--custom.important.start--> | ||
<!--custom.important.end--> | ||
|
||
## Code examples | ||
|
||
### Prerequisites | ||
|
||
For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-cli` folder. | ||
|
||
|
||
<!--custom.prerequisites.start--> | ||
<!--custom.prerequisites.end--> | ||
|
||
### Single actions | ||
|
||
Code excerpts that show you how to call individual service functions. | ||
|
||
* [Create a table](dynamodb_operations.sh#L22) (`CreateTable`) | ||
* [Delete a table](dynamodb_operations.sh#L936) (`DeleteTable`) | ||
* [Delete an item from a table](dynamodb_operations.sh#L477) (`DeleteItem`) | ||
* [Get a batch of items](dynamodb_operations.sh#L840) (`BatchGetItem`) | ||
* [Get an item from a table](dynamodb_operations.sh#L382) (`GetItem`) | ||
* [Get information about a table](dynamodb_operations.sh#L126) (`DescribeTable`) | ||
* [List tables](dynamodb_operations.sh#L907) (`ListTables`) | ||
* [Put an item in a table](dynamodb_operations.sh#L200) (`PutItem`) | ||
* [Query a table](dynamodb_operations.sh#L556) (`Query`) | ||
* [Scan a table](dynamodb_operations.sh#L664) (`Scan`) | ||
* [Update an item in a table](dynamodb_operations.sh#L283) (`UpdateItem`) | ||
* [Write a batch of items](dynamodb_operations.sh#L772) (`BatchWriteItem`) | ||
|
||
### Scenarios | ||
|
||
Code examples that show you how to accomplish a specific task by calling multiple | ||
functions within the same service. | ||
|
||
* [Get started with tables, items, and queries](scenario_getting_started_movies.sh) | ||
|
||
## Run the examples | ||
|
||
### Instructions | ||
|
||
|
||
<!--custom.instructions.start--> | ||
<!--custom.instructions.end--> | ||
|
||
|
||
|
||
#### Get started with tables, items, and queries | ||
|
||
This example shows you how to do the following: | ||
|
||
* Create a table that can hold movie data. | ||
* Put, get, and update a single movie in the table. | ||
* Write movie data to the table from a sample JSON file. | ||
* Query for movies that were released in a given year. | ||
* Scan for movies that were released in a range of years. | ||
* Delete a movie from the table, then delete the table. | ||
|
||
<!--custom.scenario_prereqs.dynamodb_Scenario_GettingStartedMovies.start--> | ||
<!--custom.scenario_prereqs.dynamodb_Scenario_GettingStartedMovies.end--> | ||
|
||
|
||
<!--custom.scenarios.dynamodb_Scenario_GettingStartedMovies.start--> | ||
<!--custom.scenarios.dynamodb_Scenario_GettingStartedMovies.end--> | ||
|
||
### Tests | ||
|
||
⚠ Running tests might result in charges to your AWS account. | ||
|
||
|
||
To find instructions for running these tests, see the [README](../../README.md#Tests) | ||
in the `aws-cli` folder. | ||
|
||
|
||
|
||
<!--custom.tests.start--> | ||
<!--custom.tests.end--> | ||
|
||
## Additional resources | ||
|
||
* [DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) | ||
* [DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) | ||
* [Command Line Interface with Bash script DynamoDB reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dynamodb/index.html) | ||
|
||
<!--custom.resources.start--> | ||
<!--custom.resources.end--> | ||
|
||
--- | ||
|
||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
Oops, something went wrong.