Amazon Timestream - Developer Guide

Developer Guide

Amazon Timestream

Copyright ? 2024 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon Timestream

Amazon Timestream: Developer Guide

Developer Guide

Copyright ? 2024 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

Amazon Timestream

Table of Contents

Developer Guide

Amazon Timestream for LiveAnalytics ........................................................................................... 1 Timestream for LiveAnalytics key benefits ............................................................................................. 1 Timestream for LiveAnalytics use cases .................................................................................................. 2 Getting started with Timestream for LiveAnalytics .............................................................................. 2 How it works ................................................................................................................................................. 3 Concepts .................................................................................................................................................... 3 Architecture .............................................................................................................................................. 5 Writes ....................................................................................................................................................... 10 Storage .................................................................................................................................................... 24 Queries .................................................................................................................................................... 26 Scheduled queries ................................................................................................................................. 30 Timestream Compute Unit (TCU) ...................................................................................................... 30 Accessing Timestream for LiveAnalytics ................................................................................................ 35 .................................................................................................................................................................. 35 Using the console ................................................................................................................................. 39 Using the AWS CLI ............................................................................................................................... 44 Using the API ......................................................................................................................................... 48 Using the AWS SDKs ............................................................................................................................ 51 Getting started ........................................................................................................................................... 56 Tutorial .................................................................................................................................................... 56 Sample application ............................................................................................................................... 58 Code samples .............................................................................................................................................. 59 Write SDK client .................................................................................................................................... 60 Query SDK client ................................................................................................................................... 63 Create database .................................................................................................................................... 65 Describe database ................................................................................................................................. 69 Update a database ............................................................................................................................... 73 Delete database .................................................................................................................................... 77 List databases ........................................................................................................................................ 81 Create table ............................................................................................................................................ 86 Describe table ........................................................................................................................................ 94 Update table .......................................................................................................................................... 98 Delete table ......................................................................................................................................... 102 List tables ............................................................................................................................................. 106

iii

Amazon Timestream

Developer Guide

Write data ............................................................................................................................................ 111 Run query ............................................................................................................................................. 166 Run UNLOAD query ........................................................................................................................... 191 Cancel query ........................................................................................................................................ 214 Create batch load task ...................................................................................................................... 217 Describe batch load task .................................................................................................................. 231 List batch load tasks .......................................................................................................................... 236 Resume batch load task .................................................................................................................... 241 Create scheduled query .................................................................................................................... 245 List scheduled query .......................................................................................................................... 261 Describe scheduled query ................................................................................................................. 265 Execute scheduled query .................................................................................................................. 268 Update scheduled query ................................................................................................................... 272 Delete scheduled query .................................................................................................................... 275 Using batch load ...................................................................................................................................... 278 Concepts ............................................................................................................................................... 278 Prerequisites ........................................................................................................................................ 279 Best practices ...................................................................................................................................... 281 Preparing a batch load data file ..................................................................................................... 282 Data model mappings ....................................................................................................................... 283 Using batch load with the console ................................................................................................. 287 Using batch load with the CLI ......................................................................................................... 291 Using batch load with the SDKs ..................................................................................................... 299 Using batch load error reports ........................................................................................................ 299 Using scheduled queries ......................................................................................................................... 300 Benefits ................................................................................................................................................. 301 Use cases .............................................................................................................................................. 301 Example ................................................................................................................................................ 302 Concepts ............................................................................................................................................... 302 Schedule expressions ......................................................................................................................... 306 Data model mappings ....................................................................................................................... 310 Notification messages ........................................................................................................................ 329 Error reports ........................................................................................................................................ 336 Patterns and examples ...................................................................................................................... 340 Using UNLOAD ......................................................................................................................................... 439 Benefits ................................................................................................................................................. 440

iv

Amazon Timestream

Developer Guide

Use cases .............................................................................................................................................. 440 Concepts ............................................................................................................................................... 441 Prerequisites ........................................................................................................................................ 451 Best practices ...................................................................................................................................... 453 Example use case ............................................................................................................................... 454 Limits ..................................................................................................................................................... 459 Working with AWS Backup .................................................................................................................... 460 How it works ....................................................................................................................................... 461 Creating backups ................................................................................................................................ 464 Restoring backups .............................................................................................................................. 466 Copying backups ................................................................................................................................. 467 Deleting backups ................................................................................................................................ 468 Quotas and limits ............................................................................................................................... 468 Customer-defined partition keys .......................................................................................................... 469 Using customer-defined partition keys .......................................................................................... 470 Getting started with customer-defined partition keys ............................................................... 470 Checking partitioning schema configuration ................................................................................ 474 Updating partitioning schema configuration ............................................................................... 480 Advantages of customer-defined partition keys .......................................................................... 483 Limitations of customer-defined partition keys ........................................................................... 483 Customer-defined partition keys and low cardinality dimensions ........................................... 483 Creating partition keys for existing tables .................................................................................... 484 Timestream for LiveAnalytics schema validation with custom composite partition keys .... 484 Tagging resources .................................................................................................................................... 487 Tagging restrictions ............................................................................................................................ 487 Tagging operations ............................................................................................................................ 488 Security ...................................................................................................................................................... 489 Data protection ................................................................................................................................... 490 Identity and access management ................................................................................................... 493 Logging and monitoring ................................................................................................................... 531 Resilience .............................................................................................................................................. 535 Infrastructure security ....................................................................................................................... 535 Configuration and vulnerability analysis ....................................................................................... 535 Incident response ............................................................................................................................... 536 VPC endpoints ..................................................................................................................................... 536 Security best practices ...................................................................................................................... 540

v

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download