Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Function Name return undefined #139

Open
flaviofilipe opened this issue Sep 17, 2021 · 3 comments
Open

Get Function Name return undefined #139

flaviofilipe opened this issue Sep 17, 2021 · 3 comments

Comments

@flaviofilipe
Copy link

return result;

Error message:
TypeError: Cannot read property 'runtime' of undefined

If I create an SNS Subscription, without SQS or SNS function, I can't get the function name.

In CreateHandler I can't get the runtime property:

if (!fn.runtime || fn.runtime.startsWith("nodejs")) {

the fn is undefined.

My Subscription

mySubscription:
      Type: 'AWS::SNS::Subscription'
      Properties:
        TopicArn: !Ref myTopic
        Endpoint: !GetAtt
          - myConsumer
          - Arn
        Protocol: sqs
        RawMessageDelivery: 'true'

My Topic

    myTopic:
      Type: "AWS::SNS::Topic"
      Properties:
        TopicName: my-topic

My Queues

    consumerRelease:
      Type: "AWS::SQS::Queue"
      Properties:
        QueueName: my-queue
        RedrivePolicy:
          deadLetterTargetArn: !GetAtt myQueueDlq.Arn
          maxReceiveCount: 3

    myQueueDlq:
      Type: "AWS::SQS::Queue"
      Properties:
        QueueName: my-queue-dlq
@JordanPawlett
Copy link

This is still an issue. Prevents serverless offline from starting when you have SQS subscribed to an SNS topic.

@thejuan
Copy link
Contributor

thejuan commented Jun 6, 2022

Also preventing us upgrading

@Angc288
Copy link

Angc288 commented Aug 17, 2022

Having same issue. Any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants