serverless-step-functions
serverless-step-functions copied to clipboard
Custom Authorizer Error
This is a Bug Report
Description
For bug reports: I have added a custom authorizer as per the plugins instructions, however it repeatedly fails. I have tried many different combinations, including the exact arn for the authorizer lambda.
Using an IAM as an authorizer works - but this was only to validate that an authorizer could be added.
Here is an extract of my serverless.yml
custom:
pythonRequirements:
dockerizePip: non-linux
authorizer: arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:auth-service-${self:provider.stage}-auth
functions:
stepTest:
handler: stepTest.lambda_handler
package: {}
stepFunctions:
stateMachines:
hellostepfunc1:
events:
- http:
path: onboard
method: post
authorizer: ${self:custom.authorizer}
cors: true
request:
template: lambda_proxy
name: OnBoardingStateMachine
definition:
Comment: "Step function to manage the onboarding service"
StartAt: HelloWorld1
States:
HelloWorld1:
Type: Task
Resource: arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${self:service}-${self:provider.stage}-stepTest
InputPath: $
Parameters:
input.$: $
step: HelloWorld1
End: true
resources:
Outputs:
MyStateMachine:
Description: The ARN of the example state machine
Value:
Ref: OnBoardingStateMachine
I get the following output:
Type Error ---------------------------------------------
TypeError: Cannot read property 'Fn::GetAtt' of undefined
at getFunctionLogicalId
Similar or dependent issues:
- #38
Additional Data
- Serverless Framework Core Version you're using: 1.82.0
- The Plugin Version you're using: 2.26
- Operating System: MacOS
Facing the same issue as the OP. @db46 have you found a solution to this?
I am also having this problem @db46 . Is there a solution or a workaround?