ApiKey

command
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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::ApiKey
Properties:
  ServiceToken: !Import ForgeResources-ApiKey
  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