Unique sequence number generator in AWS without RDS?

James Daily

Does any AWS service or solution offer sequence functionality similar to SQL Sequences as found in Postgres or Oracle (or any other RDBMS), without having to maintain an entire Postgres instance?

I do have access to RDS if needed, but I'm wondering if it's overkill just for one sequence and whether theres a simpler/cheaper solution.

Ideally the sequence would be 8 digit numbers, and not needed at a particularly high volume (just a few thousand per day).

Edit: Possible duplicate of Distributed sequence number generation?

Edit 2: To clarify, the goal is to have uniqueness, with simple numbers. Number order is not important, as long as they are unique.

John Rotenstein

If you are okay with simply having unique IDs (without being sequential), AWS Key Management Service (KMS) has a GenerateRandom function. The chance of duplication is very small.

Or, you could go with a traditional GUID/UUID.

However, if you want the IDs to be sequential, then you will need somewhere to store the value:

  • Amazon DynamoDB is a convenient datastore that offers a much lower cost than an Amazon RDS instance. There is even an Atomic counter that can increment and return the count.
  • If your volume isn't very high, you could consider storing the value in the AWS Systems Manager Parameter Store, which has simple Put/Get capabilities and zero cost.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Generating 6 digit unique random number generator sequence in oracle

Correct the sequence generator start number?

Sequence without the row number

Random number generator without replacement?

Generate unique contiguous sequence number based on specific criteria without using TABLOCKX

12 digit unique distributed random number generator

Databricks use AWS RDS without JDBC/ODBC

Javascript unique random number generator is not generating unique numbers

Python Random Number Unique number generator before using new numbers

Excel Random Number Generator Without Producing Duplicates?

Random number generator without repeating numbers

c++ Gaussian random number generator keeps generating same sequence

sequence number generator based on input params in java/scala

How to construct predefined random number generator and seed sequence in constructor?

How can I implement a sequence of numbers in this Prime number generator?

Sequence Generator without @Id annotation in java with hibernate in Postgres within a range

The way of run the "pg_dump" command on AWS RDS without decreasing the performance of AWS RDS

Random number generator that returns unique entries in sorted order

Scala Random Number Generator Not Producing Unique Random Numbers Between A Range

AWS RDS: How to get hold of the Current Activity / Number of Connections?

Oracle Sequence generator returns a negative value , when the sequence number is stored in Java variable

How to connect to PostgreSQL DB without a "database" name from AWS RDS

Are AWS RDS T3 instances launched with or without the "unlimited" flag?

How to change master password on AWS RDS without downtime?

How to change AWS-RDS instance type without downtime?

Connecting to AWS RDS from java without exposing password

Access AWS RDS from local machine without EC2

Number of unique visitors on a website hosted on AWS

allocate a sequence number to items until set items are found unique then jump on to next number in the sequence