cfapikey

command
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

CF Api Key

To bind an Api of the API Gateway to a custom Cloud Front distribution requires the use of a API Key to protect the native end point of the API and to make sure that the API is available only via the Cloud Front distribution. Unfortunately, the out-of-the-box resource `AWS::ApiGateway::ApiKey` does not allow to extract the key secret. This resource creates api keys and export the key secret.

## Syntax To create a new api key, add the following resource to your template

```yaml MyCfApiKey:

Type: Custom::CfApiKey
Properties:
  ServiceToken:
    Fn::ImportValue:
      !Sub ${HyperdriveCore}-CfApiKey
  Ordinal: <number>

```

## Properties

`Ordinal`

> The name of the API keys is created automatically from the Stack Name and the Ordinal. By making the Ordinal > a parameter of the stack, one can easily rotate the keys. You can automate the key rotation with the > AWS Lambda `RotateCfApiKey`.

> _Type_: Number > > _Required: Yes > > _Update Requires_: Replacement

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL