Home > front end >  Is it possible to create DynamoDB stream ARN without date of creation?
Is it possible to create DynamoDB stream ARN without date of creation?

Time:10-03

If to enable stream in table setting,Latest Stream ARN looks like:

arn:aws:dynamodb:region:account-id:table/table-name/stream/2022-06-08T12:23:37.791

Is possible to create DynamoDB Stream ARN without date of creation and reference table by this ARN ?

arn:aws:dynamodb:region:account-id:table/table-name/stream

CodePudding user response:

No, it is not possible, as an Stream ARN has always the following syntax:

arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/stream/${StreamLabel}

and according to the documentation, the StreamLabel is:

A timestamp, in ISO 8601 format, for this stream.

However you can implement an initialization code to retrieve the ARN. For instance using the list-streams API call.

Using list-streams you can retrieve streams belonging to a specific table:

aws dynamodbstreams list-streams --table-name <TableName>

CodePudding user response:

With DynamoDB streams the ARN always appends ISO8601 timestamp.

You didn't clearly state the reason you did not want the timestamp, but a possible workaround could be to use Kinesis Data Streams with DynamoDB where the ARN does not have a timestamp appended.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/kds.html

  • Related