0

I have dynamodb arn string and want to combine manually about the string of stream arn.

arn:aws:dynamodb:us-east-1:123456789012:table/books_table
arn:aws:dynamodb:us-east-1:123456789012:table/books_table/stream/2015-05-11T21:21:33.291

Any one who knows how to get label in aws cloudformation of '2015-05-11T21:21:33.291' and give me example combine the dynamodb arn string to dynamodb stream arn string.

ps:

I can not use:

Fn::GetAtt: [ 'dynamodbTableLogicalId', 'StreamArn' ]

Because my dynamodb arn is the output string of my nested stack. I do not want export everything in nested stack.

user504909
  • 9,119
  • 12
  • 60
  • 109

1 Answers1

0

If you have created the DynamoDB table in the template you can use Fn::GetAtt to get the stream arn.

Fn::GetAtt: [ 'dynamodbTableLogicalId', 'StreamArn' ]

If you are getting the stream date/label another way you can join it to the table arn with Fn::Join

cementblocks
  • 4,326
  • 18
  • 24
  • Hi, I can not use Fn::GetAtt: [ 'dynamodbTableLogicalId', 'StreamArn' ]. That because my dynamodbTable is inside one of my nested stack. and the dynamodb arn is the output of that stack. I do not want output everything inside the stack. – user504909 Jan 15 '19 at 03:03
  • Why not add the streamArn to the nested stack's outputs? Or output the stream arn instead of the table arn. (You could use Fn::Split, Fn::Select, and Fn::Join get the table arn from the stream arn, but you could just return both. – cementblocks Jan 15 '19 at 14:29