# `ExOss.CDN.CloudFront`
[🔗](https://github.com/choice-form/ex_oss/blob/main/lib/ex_oss/cdn/cloudfront.ex#L1)

CloudFront CDN adapter.

Implements `ExOss.CDN.Behaviour` to generate signed CloudFront URLs
for both download and upload operations.

CloudFront signed URLs use an RSA-SHA1 signature over a JSON policy
document, along with `Key-Pair-Id`, `Expires`, `Signature`, and
`Policy` query parameters.

## Configuration

    config :my_app, MyApp.Storage,
      cdn: [
        provider: :cloudfront,
        endpoint: "https://d123456789.cloudfront.net",
        aws_key_id: "K2XXXXXXXXXXXXX",
        aws_private_key: "-----BEGIN RSA PRIVATE KEY-----\n..."
      ]

# `sign`

```elixir
@spec sign(binary(), binary()) :: binary()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
