Skip to content

API Keys not working as expected #2058

@dwtalk

Description

@dwtalk

This is a Bug Report

Description

API Keys specified in the serverless yaml file are not able to be leveraged

Details

When an API key is specified in the serverless.yml file as such:

provider:
name: aws
runtime: java8
apiKeys:
- mytestapikey

The behavior is that an api key is created in AWS, however it is not usable.

  1. The API key is created with the given value "mytestapikey" in yaml as the name of the key, where as the actual API key value (the data sent in header) is randomly generated. This needs to be changed to "Custom" and the data in the YAML file should be an array of key value pairs, the API key name and API key value.
  2. Once an API key is successfully created, it is not usable without a usage plan. This seems like it could be accomplished in the cloudfront section, but the documentation does not make it clear that this needs to be in place to leverage an API key when for a given function "private: true" is set.

Additional Data

  • _Serverless Framework Version you're using_:
    1.0rc <- head as of 9/6/16
  • _Operating System_:
    OSX
  • _Stack Trace_:
    N/A
  • _Provider Error messages_:
    {403: Forbidden}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions