I hit something today that the documentation did not state properly. If you are using the popular Faker library, which is a great library, then is a good chance you tried to use the optional() function. Basically, optional takes a decimal value to generate a NULL or valid value for the provider that you use. … Continue reading PHP Faker and optional()
Journey
Do not install xq, only yq
I've always been a fan of jq. If you don't know what jq is, it is a nifty tool with it's own DSL that allows major JSON transformation from the command line. Read on about it here: https://stedolan.github.io/jq/ There are other flavours such as yq and xq both for YAML and XML support. I was … Continue reading Do not install xq, only yq
I keep getting permission denied public key when using code commit
This one can be confusing at first but the most probable reason is you put your programmatic ACCESS KEY in the SSH config (~/.ssh/config) instead of the ACCESS KEY associated with your public key.
CloudFormation and scaling down of RedisClusters
It seems it is not possible to scale down redis-clusters. I always end up with an error: Cannot scale from cache.t2.medium to cache.t2.micro So the only solution i found was to create another cluster, update references to it in my launch templates and then run another update after that to delete the old one.
CloudFormation development tips
One of the biggest hurdles i have faced in my recent tests with CloudFormation was that i can take a lot of time to test your CloudFormation scripts. The online designer works but is quirky so what's left if you want to test our your infrastructure script? The answer is simple, just test it out … Continue reading CloudFormation development tips
IamInstanceRole and CloudFormation
So i hit this small roadbump the other day. I am pretty much discovering CloudFormation, what an awesome tool, but somethings are inconsistent here and there depending on your approach. The error So i had this error ... for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name (Service: AmazonEC2; Status Code: 400; Error Code: … Continue reading IamInstanceRole and CloudFormation
S3 access on an ec2 instance in a private subnet
Context In the last few days, i had to setup a complete AWS infrastructure for a startup. The objective was to have different ec2 machines that are auto-scaled into existence access an s3 bucket on initialization to get some configuration that shouldn't be baked into a snapshot. The script was working fine when i was … Continue reading S3 access on an ec2 instance in a private subnet
ES2015 const and object expansion
So i've been fighting with this problem this morning. I'm relatively new to ES2015 and still learning a lot of things regarding the very nice constructs you can use in there. One that threw me off this morning is this: export const someDefaultReduxStateObject = { property1: null, property2: [] } myArray = [] myArray.push({...someDefaultReduxStateObject}) myArray.push({...someDefaultReduxStateObject}) … Continue reading ES2015 const and object expansion
Fixing the node-sass binding through different docker architecture
Let's say you can't run NPM on your host machine for diverse reason and you want to run it in a docker container. Should prove to be super simple no? Wrong! (In the case you are using sass... I don't know many people not using sass!) Node sass bindings So, the first problem that will … Continue reading Fixing the node-sass binding through different docker architecture
Docker swarming
If you haven't used docker swarming yet, it is a wonderful feature that i had yet to test. I tried different things to understand the power behind this and tried a software to manage the swarm that we'll see in the next article. What is a swarm A swarm is a collection of machines that … Continue reading Docker swarming