Skip to content

Instantly share code, notes, and snippets.


Kevin Hooke kevinhooke

View GitHub Profile
View gist:6c86696442375bc884c7c03ae236ec35
#WAFv2 IPSet rules must be created in us-east-1 with scope=CLOUDFRONT (not REGIONAL) to apply to a CloudFront distribution
"yourIpList": {
"Type": "AWS::WAFv2::IPSet",
"Properties": {
"Scope": "CLOUDFRONT",
"IPAddressVersion": "IPV4",
"Addresses": ["your","list","of","ips"]
kevinhooke / gist:cebcaaf21eb8bb16eddc6bc3a9d5ba94
Created Dec 2, 2020
AWS cli CloudFormation run against region
View gist:cebcaaf21eb8bb16eddc6bc3a9d5ba94
aws cloudformation create-stack #will run against your configured region in your cli config
aws cloudformation create-stack ... --region region-here #will run against specified region
kevinhooke / gist:e3dfc898a59698094d1a29cfb4adfe82
Created Dec 2, 2020
CloudFormation parameter error with string csv values
View gist:e3dfc898a59698094d1a29cfb4adfe82
type: <class 'list'>, valid types: <class 'str'>
e.g. --parameters ParameterKey=example,ParameterValue=a,b,c
pass as a escaped quote sting:
e.g. --parameters ParameterKey=example,ParameterValue=\"a,b,c\"
View gist:fa8820027135a85cfccf53631dca61c7
aws cloudformation create-stack --stack-name STACK-NAME --template-body file://template-file.json
--parameters ParameterKey=example1,ParameterValue=value1 ParameterKey=example2,ParameterValue=value2
# pass optional --region regionname to run stack creation in a different region than your default
aws cloudformation delete-stack --stack-name STACK-NAME
aws cloudformation list-stacks
-- creating stacks that create named IAM resources need the --capabilities CAPABILITY_NAMED_IAM param passed, otherwise you get this error:
kevinhooke / gist:3faa60f27564a7884ee44abb7996861a
Last active Aug 31, 2020
Common Kafka and Confluent Platform ports
View gist:3faa60f27564a7884ee44abb7996861a
bootstrap server: 9092
control center: 9091
schema-registry: 8081
Connectors rest endpoint: 8083
ksql-server: 8088
View gist:221bd673781385a07b4a796c1388788a
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'PDT' is unrecognized
or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone'
configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
- add default timezone to server my.cnf:
- add to JDBC connection url:
View gist:1aeacba0b3170c5c4187abe53613aed8
- multiple transforms as a csv list
"transforms": "fieldRenames,recordTimeStamp,constantExample",
- whitelist on field names is case sensitive and needs to match transformed names
this is a list of fields allowed in the output (not the input fields if they are transformed or renamed)
- transforms on field names are case sensitive
"transforms.fieldRenames.type": "org.apache.kafka.connect.transforms.ReplaceField$Value",
kevinhooke / gist:441c8c0651b7cc26bb599897cadeb5e9
Created Aug 8, 2020
Confluent Connector error: org.apache.kafka.connect.errors.DataException xyz is not a valid field name
View gist:441c8c0651b7cc26bb599897cadeb5e9
For a timestamp based connector, column xyz must be in the outer select
kevinhooke / gist:483a4fd4fe30fa9af1528a9454df2b7e
Created Jul 20, 2020 for javascript test code coverage (e.g. from 'jest --coverage')
View gist:483a4fd4fe30fa9af1528a9454df2b7e
#configure to point to the output file
You can’t perform that action at this time.