Skip to content

feat: IAMPolicyResponse - #174

Closed
msailes wants to merge 1 commit into
aws:masterfrom
msailes:iam-policy
Closed

msailes wants to merge 1 commit into
aws:masterfrom
msailes:iam-policy

Conversation

@msailes

@msailes msailes commented Oct 12, 2020

Copy link
Copy Markdown
Contributor

Issue #, if available:
N/A

Description of changes:
Added support for the IAMPolicy response as part of a API Gateway custom authorizer.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@msailes

msailes commented Oct 12, 2020 •

Copy link
Copy Markdown
Contributor Author

From https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html

{
  "principalId": "abcdef", 
  "policyDocument": {
    "Version": "2012-10-17",
    "Statement": [
      {
        "Action": "execute-api:Invoke",
        "Effect": "Allow|Deny",
        "Resource": "arn:aws:execute-api:{regionId}:{accountId}:{apiId}/{stage}/{httpVerb}/[{resource}/[{child-resources}]]"
      }
    ]
  },
  "context": {
    "exampleKey": "exampleValue"
  }
}

@msailes

msailes commented Dec 29, 2020

Copy link
Copy Markdown
Contributor Author

Slight misunderstanding here.

Because this is a response object, there isn't a serialization change needed to Lambda.

However with the current dependencies I'm not sure how to response with capitalized Version and Statement.

@msailes msailes closed this Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants