Can't use Fn::Sub?

I tried to search the forum first, but searching for “sub” is rather difficult.

I’m unable to use the following:

    Fn::Sub: "${TracksTable.StreamArn}"

I get this error:

Invalid variable reference syntax for variable TracksTable.StreamArn. You can only reference env vars, options, & files. You can check our docs for more info.

I’m guessing this is colliding with Serverless’s own variable name interpolation. Do I have to use Fn::GetAtt instead?

1 Like

Hi, hope this helps someone else

Try using

    Fn::Sub: "#{TracksTable.StreamArn}"