Skip to content

OriginAccessControlConfig

Source code in docs_src/capo_cloudfront/types/origin_access_control_config.py
class OriginAccessControlConfig(TypedDict, closed=True):
    name: "capo_cloudfront.types.string.string"
    """<p>A name to identify the origin access control. You can specify up to 64 characters.</p>"""
    description: NotRequired["capo_cloudfront.types.string.string"]
    """<p>A description of the origin access control.</p>"""
    signing_protocol: "capo_cloudfront.types.origin_access_control_signing_protocols.OriginAccessControlSigningProtocols"
    """<p>The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid values are <code>sigv4</code> and <code>sigv4a</code>.</p>"""
    signing_behavior: "capo_cloudfront.types.origin_access_control_signing_behaviors.OriginAccessControlSigningBehaviors"
    """<p>Specifies which requests CloudFront signs (adds authentication information to). Specify <code>always</code> for the most common use case. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html#oac-advanced-settings">origin access control advanced settings</a> in the <i>Amazon CloudFront Developer Guide</i>.</p> <p>This field can have one of the following values:</p> <ul> <li> <p> <code>always</code> – CloudFront signs all origin requests, overwriting the <code>Authorization</code> header from the viewer request if one exists.</p> </li> <li> <p> <code>never</code> – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.</p> </li> <li> <p> <code>no-override</code> – If the viewer request doesn't contain the <code>Authorization</code> header, then CloudFront signs the origin request. If the viewer request contains the <code>Authorization</code> header, then CloudFront doesn't sign the origin request and instead passes along the <code>Authorization</code> header from the viewer request. <b>WARNING: To pass along the <code>Authorization</code> header from the viewer request, you <i>must</i> add the <code>Authorization</code> header to a <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html">cache policy</a> for all cache behaviors that use origins associated with this origin access control.</b> </p> </li> <li> <p> <code>always-amz-auth</code> – CloudFront signs all origin requests with Amazon authentication headers. If the viewer request contains the <code>Authorization</code> header, then CloudFront also forwards that header to the origin. This value is only valid with Lambda-Web origins. <b>WARNING: To forward the <code>Authorization</code> header from the viewer request, you <i>must</i> add the <code>Authorization</code> header to a <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html">cache policy</a> for all cache behaviors that use origins associated with this origin access control.</b> </p> </li> </ul>"""
    origin_access_control_origin_type: "capo_cloudfront.types.origin_access_control_origin_types.OriginAccessControlOriginTypes"
    """<p>The type of origin that this origin access control is for.</p>"""

description instance-attribute

description: NotRequired[string]

A description of the origin access control.

name instance-attribute

name: string

A name to identify the origin access control. You can specify up to 64 characters.

origin_access_control_origin_type instance-attribute

origin_access_control_origin_type: OriginAccessControlOriginTypes

The type of origin that this origin access control is for.

signing_behavior instance-attribute

Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide.

This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.

  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.

  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.

  • always-amz-auth – CloudFront signs all origin requests with Amazon authentication headers. If the viewer request contains the Authorization header, then CloudFront also forwards that header to the origin. This value is only valid with Lambda-Web origins. WARNING: To forward the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.

signing_protocol instance-attribute

The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid values are sigv4 and sigv4a.