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

Issue when using custom authorizers with serverless-pseudo-parameters plugin #112

Closed
aleksdikanski opened this issue Mar 16, 2018 · 0 comments
Labels
Milestone

Comments

@aleksdikanski
Copy link

Hi,

I stumbled upon this today:
when using the serverless-pseudo-parameters plugin, the custom authorizer support breaks.

An error occurred: AuthorizerApiGatewayAuthorizerdev - Invalid Authorizer URI: :${stageVariables.SERVERLESS_ALIAS}arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:811794430790:function:authorizer/invocations. Authorizer URI should be a valid API Gateway ARN that represents a Lambda function invocation..

Reason seems to be that the pseudo parameters plugin replaces the direct arn reference of the lambda arn:aws:lambda: .... with a call to Cloudformation Fn::Sub function (as intented). This break the detection of the custom authorizer as I implemented it.

...
{
   "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:authorizer"
},
...

I created a Pull Request to fix this.

@HyperBrain HyperBrain added the bug label Mar 20, 2018
@HyperBrain HyperBrain added this to the 1.6.2 milestone Mar 20, 2018
@HyperBrain HyperBrain modified the milestones: 1.6.2, 1.7.0 Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants