Hi All,
I get the following error when trying to deploy to dev.
TypeError: name.replace is not a function
at Object.normalizeNameToAlphaNumericOnly (/app/node_modules/serverless/lib/plugins/aws/lib/naming.js:32:36)
at Object.getQueueLogicalId (/app/node_modules/serverless/lib/plugins/aws/lib/naming.js:366:35)
at functionObj.events.forEach.event (/app/node_modules/serverless/lib/plugins/aws/package/compile/events/sqs/index.js:92:57)
at Array.forEach (<anonymous>)
at serverless.service.getAllFunctions.forEach.functionName (/app/node_modules/serverless/lib/plugins/aws/package/compile/events/sqs/index.js:26:28)
at Array.forEach (<anonymous>)
at AwsCompileSQSEvents.compileSQSEvents (/app/node_modules/serverless/lib/plugins/aws/package/compile/events/sqs/index.js:16:47)
I’m trying to create a SQS in resources and functions which is supposed to reference to the SQS in AWS with the given name
here is the yaml section:
verifyPayment:
handler: tasks.verifyPayment
timeout: 300
reservedConcurrency: 5
events:
- sqs:
batchSize: 1
arn:
Fn::GetAtt:
# - VerifyPaymentQueue-${opt:stage}
- ${self:provider.environment.VERIFY_PAYMENT_SQS_URL}
- Arn
…
Resources:
VerifyPaymentQueue:
Type: AWS::SQS::Queue
Properties:
# Ref: ${opt:stage}VerifyPaymentQueue
# QueueName: ${opt:stage}VerifyPaymentQueue
QueueName: ${self:provider.environment.VERIFY_PAYMENT_SQS_URL}
VisibilityTimeout: 300
…
environment:
VERIFY_PAYMENT_SQS_URL:
Ref:
${self:custom.stage}VerifyPaymentQueue
# Fn::Join:
# - ""
# - - VerifyPaymentQueue
# - "-"
# - ${self:provider.stage}
I think something with the name is incorrect or the away I attempt to find the SQS in AWS
Thanks for the help.