steampipe plugin install aws

Table: aws_cloudfront_origin_request_policy - Query AWS CloudFront Origin Request Policies using SQL

The AWS CloudFront Origin Request Policy is a feature of Amazon CloudFront, a content delivery network service. It allows you to control how much information about the viewer's request is forwarded to the origin. This includes headers, cookies, and URL query strings, enabling you to customize the content returned by your origin based on the values in the request.

Table Usage Guide

The aws_cloudfront_origin_request_policy table in Steampipe provides you with information about Origin Request Policies within AWS CloudFront. This table allows you, as a DevOps engineer, to query policy-specific details, including ID, name, comment, cookies configuration, headers configuration, query strings configuration, and more. You can utilize this table to gather insights on policies, such as policy configurations and associated metadata. The schema outlines the various attributes of the Origin Request Policy for you, including the policy ID, creation date, last modified date, and associated tags.

Examples

Basic info

Explore which AWS Cloudfront origin request policies have been modified recently, gaining insights into potential changes and updates. This can be useful for maintaining security compliance and ensuring correct configuration.

select
name,
id,
comment,
etag,
last_modified_time
from
aws_cloudfront_origin_request_policy;
select
name,
id,
comment,
etag,
last_modified_time
from
aws_cloudfront_origin_request_policy;

Get details of HTTP headers associated with each origin request policy

Determine the characteristics of HTTP headers related to each origin request policy. This can be useful to understand how your CloudFront distributions are configured, which can help in optimizing your web content delivery and troubleshooting issues.

select
name,
id,
headers_config ->> 'HeaderBehavior' as header_behavior,
headers_config ->> 'Headers' as headers
from
aws_cloudfront_origin_request_policy;
select
name,
id,
json_extract(headers_config, '$.HeaderBehavior') as header_behavior,
json_extract(headers_config, '$.Headers') as headers
from
aws_cloudfront_origin_request_policy;

Schema for aws_cloudfront_origin_request_policy

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_idtextThe AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
commenttextThe comment for this origin request policy.
cookies_configjsonbThe cookies from viewer requests to include in origin requests.
etagtextThe current version of the origin request policy.
headers_configjsonbThe HTTP headers to include in origin requests.
idtext=The ID for the origin request policy.
last_modified_timetimestamp with time zoneThe date and time when the origin request policy was last modified.
nametextA unique name to identify the origin request policy.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
query_strings_configjsonbThe URL query strings from viewer requests to include in origin requests.
regiontextThe AWS Region in which the resource is located.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_cloudfront_origin_request_policy