Kinesis

Fastly will publish log messages to an Amazon Kinesis stream in the format specified in the Amazon Kinesis Data Streams logging object.

Data model

access_keystringThe access key associated with the target Amazon Kinesis stream. Not required if iam_role is specified.
formatstringA Fastly log format string. Must produce valid JSON that Kinesis can ingest. [Default {"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}]
iam_rolestringThe ARN for an IAM role granting Fastly access to the target Amazon Kinesis stream. Not required if access_key and secret_key are provided.
namestringThe name for the real-time logging configuration.
placementstringWhere in the generated VCL the logging call should be placed. If not set, endpoints with format_version of 2 are placed in vcl_log and those with format_version of 1 are placed in vcl_deliver.
regionstringA named set of AWS resources that's in the same geographical area.
secret_keystringThe secret key associated with the target Amazon Kinesis stream. Not required if iam_role is specified.
topicstringThe Amazon Kinesis stream to send logs to. Required.
format_versionintegerThe version of the custom logging format used for the configured endpoint. The logging call gets placed by default in vcl_log if format_version is set to 2 and in vcl_deliver if format_version is set to 1. [Default 2]
created_atstringDate and time in ISO 8601 format. Read-only.
deleted_atstringDate and time in ISO 8601 format. Read-only.
service_idstringAlphanumeric string identifying the service. Read-only.
updated_atstringDate and time in ISO 8601 format. Read-only.
versionstringString identifying a service version. Read-only.

Endpoints

List Amazon Kinesis log endpoints

GET/service/service_id/version/version_id/logging/kinesis

Create an Amazon Kinesis log endpoint

POST/service/service_id/version/version_id/logging/kinesis

Get an Amazon Kinesis log endpoint

GET/service/service_id/version/version_id/logging/kinesis/logging_kinesis_name

Update the Amazon Kinesis log endpoint

PUT/service/service_id/version/version_id/logging/kinesis/logging_kinesis_name

Delete the Amazon Kinesis log endpoint

DELETE/service/service_id/version/version_id/logging/kinesis/logging_kinesis_name

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)