DynamoDB Flashcards
Your low latency web application needs to store its session state in a scalable way so that it can be accessed quickly. Which service do you recommend? RDS DynamoDB Elastic File Store In memory on your EC2 instance
DynamoDB
Which of the following attributes would make a good Sort Key? CustomerID OrderNumber InvoiceDate EmailAddress
InvoiceDate
DynamoDB is a No-SQL database provided by AWS. False True
True
What is the difference between a Global Secondary Index and a Local Secondary Index (Choose 2) You can create a Local Secondary Index at any time but you can only create a Global Secondary Index at table creation time You can create a Global Secondary Index at any time but you can only create a Local Secondary Index at table creation time You can delete a Local Secondary Index at any time You can delete a Global Secondary Index at any time
You can create a Global Secondary Index at any time but you can only create a Local Secondary Index at table creation time You can delete a Global Secondary Index at any time
n DynamoDB, a scan operation is used for which of the following? Return the entire contents of a table Return the entire contents of a table filtered on the Primary Key attribute Find items in a table based on the Sort Key attribute Find items in a table based on the Primary Key attiribute
Return the entire contents of a table
In terms of performance, a scan is more efficient than a query. False True
False
Which of the following services provides in-memory write-through cache optimized for DynamoDB? Elasticache DAX CloudFront Read-replica
DAX (DynamoDB Accelerator)
By default, a DynamoDB query operation is used for which of the following? Return the entire contents of a table filtered on the Primary Key attribute Find items in a table based on the Primary Key attribute Return the entire contents of a table Find items in a table based on the Sort Key attribute
Find items in a table based on the Primary Key attribute
What is the API call to retrieve multiple items from a DynamoDB table? BatchGet GetItems BatchGetItem BatchGetItems
BatchGetItem
Using the AWS portal, you are trying to Scale DynamoDB past its preconfigured maximums. Which service can you increase by raising a ticket to AWS support? Provisioned throughput limits Global Secondary Indexes Item Sizes Local Secondary Indexes
Provisioned throughput limits
Which of the following attributes would make a good Partition Key? Size ProductType ProductID WarehouseLocation
ProductID
You have an application which reads 80 items of data every second. Each item consists of 3KB. Your application uses eventually consistent reads. What should you set the RCU read throughput to? 60 RCU 80 RCU 20 RCU 40 RCU
40 RCU
You have an application that needs to read 25 items of 13KB in size per second. Your application uses strongly consistent reads. What should you set the read throughput to? 10 25 100 50
100
Which of the following are recommended ways to optimise a query or scan in DynamoDB? (Choose 2) Set your queries to be eventually consistent Reduce the page size to return fewer items per results page Run parallel scans Filter your results based on the Primary Key and Sort Key
Reduce the page size to return fewer items per results page Run parallel scans
Your application is storing customer order data in DynamoDB. Which of the following pairs of attributes would make the best composite key to allow you to query DynamoDB efficiently to find a customer order that was placed on a specific day? CustomerID + ProductCategory CustomerID + ProductID CustomerID + Size CustomerID + OrderDate
CustomerID + OrderDate Sorry! To find an order placed on a specific date, use CustomerID and OrderDate as the composite key
What does the error “ProvisionedThroughputExceededException” mean in DynamoDB? Your EC2 instance has run out of CPU or memory The DynamoDB table is unavailable. The DynamoDB table has exceeded the allocated space. You exceeded your maximum allowed provisioned throughput for a table or for one or more global secondary indexes.
You exceeded your maximum allowed provisioned throughput for a table or for one or more global secondary indexes.
You have a motion sensor which writes 600 items of data every minute. Each item consists of 5KB. What should you set the write throughput to? 10 50 20 40
50 1 write Capacity Unit allows you to write 1KB of data per second. To calculate the write capacity: 600 / 60 = 10 writes per second x 5KB = 50KB written per second Therefore 50 WCU.
You have an application that needs to read 25 items of 13KB in size per second. Your application uses eventually consistent reads. What should you set the read throughput to? 50 RCU 10 RCU 25 RCU 100 RCU
50 RCU Each Read Capacity unit represents 1 x 4KB Strongly Consistent Read. 13KB / 4KB = 3.25 rounded up to 4 multiply by 25 = 100 which gives you the figure for Strongly consistent reads. Divide that by 2 for Eventually consistent. So the answer is 50 RCU.
Your application is storing customer order data in a DynamoDB table. You need to run a query to find all the orders placed by a specific customer in the last month, which attributes would you use in your query? The Partition Key of CustomerID and a Sort Key of OrderDate The Partition Key of OrderDate and a Sort Key of CustomerID The Partition Key of OrderDate and Sort Key of CustomerName A composite Primary Key made up of the CustomerName and OrderDate
The Partition Key of CustomerID and a Sort Key of OrderDate CustomerName is unlikely to be a unique value in the database, CustomerID is a better choice as will be a unique value. To identify all the orders placed in the last month by a customer, use OrderDate as the Sort Key.
You are running a query on your Customers table in DynamoBD, however you only want the query to return CustomerID and EmailAddress for each item in the table, how can you refine the query so that it only includes the required attributes? Use a scan operation instead Run a query based on the Primary Key and filter the results using a Sort Key of EmailAddress Create a Global Secondary Index which only includes the attributes you need and run the query on the Global Seconday Index Use the ProjectionExpression parameter
Use the ProjectionExpression parameter