TypeError: Cannot read property 'Fn::GetAtt' of undefined #9723
Comments
@chris-hinds great thanks for reporting. Indeed as check, our handling of CF intrinsic function looks broken: serverless/lib/plugins/aws/package/compile/events/sqs.js Lines 50 to 51 in a2f7c00 PR with a fix is welcome! |
Brill, thanks for getting back to me so fast. I'll take a look shortly. |
PR for the fix: #9727 it might not be pretty but it fixes this exact bug. Serverless was setting
Serveless sees this as an object and it expected it to have a key of |
Hello @chris-hinds - could you please post full output of the error that you're getting? I believe in addition to such error, you should also get schema validation warnings that the provided syntax is not supported. Also, it's already possible to reference ARNs of existing queues with CF functions as shown here: https://www.serverless.com/framework/docs/providers/aws/events/sqs/, though it's a bit more verbose. I think we might still consider supporting CF functions passed directly as value of @medikoo What do you think - should we still support passing CF functions directly as value of |
@pgrzesik I think currently by schema, we support both ARN input as intrinsic function directly to SQS event, and when input at Still, you raise a valid point, which I didn't think through well., Indeed to avoid clutter, it seems better to support intrinsic functions only at In light of that I would just fix our schema, so we support |
Ah right, I've checked incorrectly and believed that we support only |
Running
sls deploy --stage dev
when using!ImportValue
is raising the following TypeError;The service that I am deploying is importing an output of another stack. This stack has already been deployed. There is only a single occurrence of
Fn::GetAtt
and it is in the stack that is already deployed. If I remove the!ImportValue
the stack deploys fine.Running with
SLS_DEBUG=*
doesn't give any extra infoserverless.yml
Stack I am trying to deploy now
Stack that makes use of
Fn::GetAtt
(this has already been deployed)sls deploy --stage dev
outputInstalled version
The text was updated successfully, but these errors were encountered: