sapessi / serverless-sam

Serverless framework plugin to export AWS SAM templates for a service
Apache License 2.0
152 stars 26 forks source link

Does not support apiKeys creation for private api #29

Open hcanalesmx opened 6 years ago

hcanalesmx commented 6 years ago

Hello,

I am trying to convert a Serverless Framework template to AWS SAM and I noted that the created template does not support the API key and therefore the created API is not secured - as it is usually done when deploying with the Serverless Framework template. Is there a way to include it in the AWS SAM template?

Here the related parts of the Serverless template that I want to convert:

provider:
  name: aws
  runtime: nodejs8.10
  timeout: 6 
  apiKeys:
    - myApiKey

functions:
  getSignedUrl:
    handler: handler.getSignedURL
    events:
      - http:
          path: get-signed-url
          method: post
          cors: true
          private: true
  check:
    handler: handler.check
    events:
      - http:
          path: check
          method: post
          cors: true
          private: true