-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws-appsync): Lambda Authorizer for AppSync GraphqlApi #16380
Comments
It is very strange for me to see that AWS released the custom Lambda authoriser feature as an Authorization mode for GraphQL on 30th Jul 2021 without the infra automation code. Are the teams for the Appsync CDK & the actual AppSync services different ? https://aws.amazon.com/blogs/mobile/appsync-lambda-auth/ @Danik-Barinshtein . Glad that you raised this. |
Marking this as a p1, as I see this is a popular feature, that more people will want. Having said that, whenever a new feature is added to CloudFormation, but is not yet available in CDK, you can always use escape hatches. In this case, it would look something like: const api = new appsync.GraphqlApi(this, 'Api', ...);
const cfnApi = api.node.defaultChild as CfnGraphQLApi;
cfnApi.lambdaAuthorizerConfig = {
...
} |
I'd like to pick this one up since it seems popular. I'll submit a PR early next week but in the meantime, I'd like to solicit thoughts on what the properties for export interface LambdaConfig {
/**
* The number of seconds a response should be cached for
*/
authorizerResultTtlInSeconds: number;
/**
* The ARN of the Lambda function to be called for authorization.
*/
authorizerUri: string;
/**
* A regular expression for validation of tokens before the Lambda function is called.
*/
identityValidationExpression: string;
} I feel like we could improve on these names (particularly |
^ It's really not a |
Adds the relatively new [Lambda Authorizer for GraphqlApi](https://aws.amazon.com/blogs/mobile/appsync-lambda-auth/). Closes: #16380. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Adds the relatively new [Lambda Authorizer for GraphqlApi](https://aws.amazon.com/blogs/mobile/appsync-lambda-auth/). Closes: #16380. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adds the relatively new [Lambda Authorizer for GraphqlApi](https://aws.amazon.com/blogs/mobile/appsync-lambda-auth/). Closes: aws#16380. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Hello,
Currently the GraphqlApi Construct does not support the AWS_LAMBDA AuthorizationType
Hoping to see if its possible to extend the construct with the CfnGraphqlApi's lambda authorizer config
Use Case
While I understand that the GraphqlApi is an experimental none Cfn construct, we chose to go with it due to it providing "all" the features we needed and its syntax was preferable. At this stage we are realizing that the Lambda Authorizer is the last feature we require to proceed. Before considering switching our entire CDK setup to utilize the CfnGraphqlApi I am looking to see if this feature could be added.
Proposed Solution
Extend the developed AWS_LAMBDA authorizer configuration from the CfnGraphqlApi to the GraphqlApi construct.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: