Skip to content

Instantly share code, notes, and snippets.

View jespereneberg's full-sized avatar
💪
I may be slow to respond.

Jesper Eneberg jespereneberg

💪
I may be slow to respond.
View GitHub Profile
@jespereneberg
jespereneberg / KMSKeyPolicy.json
Created February 16, 2021 22:41 — forked from duttonw/KMSKeyPolicy.json
KMS policy for cross account org usage
{
"Version": "2012-10-17",
"Id": "key-consolepolicy-4",
"Statement": [
{
"Sid": "Enable IAM User Permissions",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::${AWS::AccountId}:root"
},
@jespereneberg
jespereneberg / s3-to-es-lamba.py
Created November 18, 2016 22:54 — forked from s-fujimoto/s3-to-es-lamba.py
Import Elasticsearch from ELB access log for AWS Lambda Function
##################################################
### Elasticsearch host name
ES_HOST = "search-******************.ap-northeast-1.es.amazonaws.com"
### Elasticsearch prefix for index name
INDEX_PREFIX = "awslogs"
#################################################
### ELB access log format keys
ELB_KEYS = ["timestamp", "elb", "client_ip", "client_port", "backend_ip", "backend_port", "request_processing_time", "backend_processing_time", "response_processing_time", "elb_status_code", "backend_status_code", "received_bytes", "sent_bytes", "request_method", "request_url", "request_version", "user_agent"]