Skip to content

Support API Gateway Logging Metrics, Usage Plans, EndpointConfiguration, and CORS #248

Closed

Description

@jfuss

Parent Tracking Issue for Logging, Usage Plans, CORS etc on API resources (Implicit and Explicit). As part of this, we will move to a model where all API features will be supported in both Implicit & Explicit definitions consistently.

For deeper details on the different issues, see the appropriate issue that is referenced below.

Activity

  1. changed the title [-]Support API Gateway Logging Metrics, Usage Plans, and CORS[/-] [+]Support API Gateway Logging Metrics, Usage Plans, EndpointConfiguration, and CORS[/+] on Jan 8, 2018
  2. rabowskyb commented on Jan 8, 2018

    @rabowskyb
    Contributor

    Regarding the cors:true issue: could you please prioritize? Many users would like to utilize SAM to build web apps -- it is a huge percentage of use cases, many serveless app in fact are NOT "mobile first". Without direct CORS support, it is difficult to use SAM for web apps. Using Swagger with SAM to get around this can be painful and buggy.

  3. jfuss commented on Jan 8, 2018

    @jfuss
    ContributorAuthor

    @rabowskyb All of these (in the issue) are being prioritize with high priority in the team and are going to be the first set of things we will address this year. The team is actively talking about how to move forward and we are trying to do this as quickly as we can. We don't have timelines to share, as of now though. I hope to share more soon.

  4. samwan commented on Jan 11, 2018

    @samwan

    Does this also mean it will be more straightforward to declare a AWS::ApiGateway::Authorizer resource with Type: "Cognito_user_pool" within a SAM template? There are a few unanswered requests for advice about this topic in the aws-sam-local issue 137 (aws/aws-sam-cli#137)

  5. steveparker-1984 commented on Jan 12, 2018

    @steveparker-1984

    Can you confirm if this issue covers the built in AWS_IAM authorizer? It's a bit unclear from reading it but was referred to in the closure of #49

  6. jfuss commented on Jan 12, 2018

    @jfuss
    ContributorAuthor

    @samwan Yes, we will be supporting AWS::ApiGateway::Authorizer

    @steveparker-kcom Yes, this will cover the AWS_IAM authorizer.

    I updated the list above to call this explicitly out. (Feel free to update or add more details as well)

  7. samwan commented on Jan 13, 2018

    @samwan

    Great news, thank you. My question was generally about API Authorizers but specifically about the IAM use case asked by @steveparker-kcom. Just a suggestion... when you ship this, I think a lot of people will appreciate documentation or examples specifically about IAM gateway authorization. Thank you again!

  8. johnbest commented on Jan 16, 2018

    @johnbest

    When you do implement the IAM piece, will be simple to get access to the Cognito identity in the lambda functions?

    I think it is so close to being a very easy way to setup a website, complete with auth backend, as far as I can tell CORS and Cognito integration are the last pieces of the puzzle. (I could well be missing something with the Cognito bit, only just started looking).

  9. 77 remaining items

  10. jlhood commented on May 10, 2019

    @jlhood
    Contributor

    @deleugpn @jona Thanks for following up on this. #444 can't be merged into develop in its current form. It needs to be updated to fit within the Auth syntax we've added to AWS::Serverless::Api since it was merged. We have not currently prioritized this work internally so the fastest way to get it into SAM is for someone from the community to contribute the necessary changes.

    #547 is specifically tracking adding support for API Keys to AWS::Serverless::Api. It links to #827 as a good example PR to follow for anyone who wants to implement this feature.

  11. crawforde commented on May 13, 2019

    @crawforde

    Any updates on this? not being able to add metrics using MethodSettings makes it pretty hard to use serverless in a production environment.

  12. jfuss commented on May 13, 2019

    @jfuss
    ContributorAuthor

    @crawforde Please see above comment (it's have been released for some time now) #248 (comment)

  13. crawforde commented on May 13, 2019

    @crawforde

    Found the docs on it. Thanks! Seems like there was another issue that was preventing this from working.

  14. liam-sage commented on May 28, 2019

    @liam-sage

    @jfuss, any update on support for throttling?

    Will (or does) it consider all throttling definitions (AWS::ApiGateway::UsagePlan Throtle; AWS::ApiGateway::UsagePlan ApiStages Throtle; AWS::Serverless::Api MethodSettings)?

    I am trying to verify the response messages returned to see whether my response template works when throttling but no matter what all jobs are queued and throttling never occurs on SAM CLI. Maybe I have to do this on AWS. Any hints?

  15. brandond commented on May 28, 2019

    @brandond

    @liam-sage Are you trying to test throttling with 'start-api'? I don't think that really does anything other than add some routes and invoke your function through a simple Flask CGI wrapper - any of the more complicated stuff that API Gateway does like authorizers, throttling, etc are not included.

  16. phanikrishnahari commented on Jul 25, 2019

    @phanikrishnahari

    Hi, do we have the feature to enable logging for ApiGateway when deployed using SAM templet?

  17. ShreyaGangishetty commented on Sep 13, 2019

    @ShreyaGangishetty

    We have created an RFC #1141 to support creation of Api keys for Auth with Usage Plans. Please let us know your thoughts on the RFC

  18. juhaniniinimaa commented on Oct 7, 2019

    @juhaniniinimaa

    @phanikrishnahari

    You can't have it directly on AWS::Serverless::Api as discussed, but AWS SAM supports anything AWS CloudFormation supports so why not to apply this into your code. Template example here.

    Then you can just

    MyApi:
      Type: AWS::Serverless::Api
      Properties:
        MethodSettings: # Use execution logging  
        AccessLogSetting: # Use access logging
    
  19. awsjeffg commented on Sep 4, 2020

    @awsjeffg

    @jfuss this was reviewed as part of backlog review. What's missing here that we need?

  20. sapessi commented on Mar 17, 2021

    @sapessi

    Closing this issue for now since most feature requests are addressed. We'll track additional/new items separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions