aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

AWS::DynamoDB::Table GetAtt for DynamoDB Stream Name #1950

Open rrhodes opened 4 months ago

rrhodes commented 4 months ago

Name of the resource

AWS::DynamoDB::Table

Description

For AWS::DynamoDB::Table, CloudFormation supports !GetAtt on StreamArn to return the ARN of a DynamoDB Stream when StreamSpecification is configured.

There are cases where only the Stream's name is desirable. For example, SAM's DynamoDBStreamReadPolicy. The name can be extracted from the ARN: given DynamoDB Table MyDynamoDbTable, we get the name like so:

!Select [3, !Split [/, !GetAtt MyDynamoDbTable.StreamArn]]

Whilst the above is a sufficient workaround for now, may GetAtt be extended to support name retrieval in addition to ARN?

!GetAtt MyDynamoDbTable.StreamName