When I try to update or create a change set for a stack which uses Fn::GetAtt: Database.Endpoint.Address (where Database is the logical name of an AWS::RDS::DBInstance resource), the attempt fails with Template error: every Fn::GetAtt object requires two non-empty parameters, the resource name and the resource attribute.
This appears to be because CloudFormation decodes the YAML into the following JSON:
[
'Database',
'Endpoint',
'Address'
]
This is clearly three parameters when it ought to be two. Is this a known bug?
Fn::GetAtt expects an array with two parameters. !GetAtt allows you to use the dot notation you are trying.
Either of these should work for you:
Fn::GetAtt: [ "Database", "Endpoint.Address" ]
!GetAtt Database.Endpoint.Address
Resources:
CloudFormation Linter in VSCode shows errors inline while authoring templates along with autocompletion and documentation links:

Switch the syntax to !GetAtt Database.Endpoint.Address
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With