Cloudfront Functions
Functions
A cache policy. When it's attached to a cache behavior, the cache policy determines the following:
The request to create a new origin access identity (OAI). An origin access identity is a special CloudFront user that you can associate with Amazon S3 origins, so that you can secure all or just some of your Amazon S3 content. For more information, see Restricting Access to Amazon S3 Content by Using an Origin Access Identity in the Amazon CloudFront Developer Guide.
The connection group for your distribution tenants. When you first create a distribution tenant and you don't specify a connection group, CloudFront will automatically create a default connection group for you. When you create a new distribution tenant and don't specify a connection group, the default one will be associated with your distribution tenant.
Creates a continuous deployment policy that routes a subset of production traffic from a primary distribution to a staging distribution. After you create and update a staging distribution, you can use a continuous deployment policy to incrementally move traffic to the staging distribution. This enables you to test changes to a distribution's configuration before moving all of your production traffic to the new configuration. For more information, see Using CloudFront continuous deployment to safely test CDN configuration changes in the Amazon CloudFront Developer Guide.
A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery.
The distribution tenant.
Creates a CF function. To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage. By default, when you create a function, it’s in the `DEVELOPMENT`
stage. In this stage, you can test the function in the CF console (or with `TestFunction`
in the CF API). When you’re ready to use your function with a CF distribution, publish the function to the `LIVE`
stage. You can do this in the CF console, with `PublishFunction`
in the CF API, or by updating the `AWS::CloudFront::Function`
resource with the `AutoPublish`
property set to `true`
. When the function is published to the `LIVE`
stage, you can attach it to a distribution’s cache behavior, using the function’s ARN. To automatically publish the function to the `LIVE`
stage when it’s created, set the `AutoPublish`
property to `true`
.
A key group. A key group contains a list of public keys that you can use with CloudFront signed URLs and signed cookies.
The key value store. Use this to separate data from function code, allowing you to update data without having to publish a new version of a function. The key value store holds keys and their corresponding values.
A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
Creates a new origin access control in CloudFront. After you create an origin access control, you can add it to an origin in a CloudFront distribution so that CloudFront sends authenticated (signed) requests to the origin. This makes it possible to block public access to the origin, allowing viewers (users) to access the origin's content only through CloudFront. For more information about using a CloudFront origin access control, see Restricting access to an origin in the Amazon CloudFront Developer Guide.
An origin request policy. When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
A public key that you can use with signed URLs and signed cookies, or with field-level encryption.
A real-time log configuration.
A response headers policy. A response headers policy contains information about a set of HTTP response headers. After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy. For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide.
An Amazon CloudFront VPC origin.