The AWS CLI is a powerful tool for interacting with AWS resources straight from your terminal. The official reference guide highlights all the use cases with examples to build from.
The AWS CLI can be used to interact with DynamoDB. You can use separate files to help compose your queries and reference those in the commands. Responses can be saved to files as well.
From AWS documentation, here's an example:
aws dynamodb query \
--table-name MusicCollection \
--projection-expression "SongTitle" \
--key-condition-expression "Artist = :v1" \
--expression-attribute-values file://expression-attributes.json \
--return-consumed-capacity TOTALexpression-attributes.json:
{
":v1": {"S": "No One You Know"}
}Output:
{
"Items": [
{
"SongTitle": {
"S": "Call Me Today"
},
"SongTitle": {
"S": "Scared of My Shadow"
}
}
],
"Count": 2,
"ScannedCount": 2,
"ConsumedCapacity": {
"TableName": "MusicCollection",
"CapacityUnits": 0.5
}
}You can force a cold start by uploading new code to the Lambda. In some cases it can be useful to download the exiting Lambda code and immediately reupload the zip. For example, in the event that the Lambda is still warm during a deployment and you want to immediately see the latest changes.
DynamoDB is a NoSQL database with various read and write methods. DynamoDB uses read and write capacity units when performing operations. These can be calculated based on your needs. The following pages describe the calculations.
AWS has a tool which can stress Linux EC2 instances if needed. Log in, install and run the stress command. The Fault Injection Service can also be used to stress CPUs.