Install Fig (deprecated) https://fig.io/, an IDE-style autocomplete but for terminal, and configure in .zshrc
1 2 3 4 5 6 7
... # Fig pre block. Keep at the top of this file. [[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && . "$HOME/.fig/shell/zshrc.pre.zsh" ... # Fig post block. Keep at the bottom of this file. [[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && . "$HOME/.fig/shell/zshrc.post.zsh" ...
In IntelliJ IDEA, you can comment a line, the cursor is moved to the next line automatically. This is a very easy way to comment several lines. However, in VS Code, default behaviour is that the cursor stays on the same line.
π sed 's/tile-images-prod/tile-images-pdev/g' tile-event-import.json > tile-event-import-transformed.json
Split all requests into 25 requests per file, with jq and awk (Note: There are some restriction with AWS DynamoDB batch-write-item request - The BatchWriteItem operation can contain up to 25 individual PutItem and DeleteItem requests and can write up to 16 MB of data. The maximum size of an individual item is 400 KB.)
Import all 22 processed JSON files into DynamoDB table:
1 2 3 4
$ for f in tile-event-import-processed-{1..22}.json; do \ echo$f; \ aws --profile development dynamodb batch-write-item --request-items file://$f; \ done
When try to get the content of any /proc/PID/environ file in more readable format, you can:
1 2 3 4
/proc/[pid]/environ This file contains the environment for the process. The entries are separated by null bytes ('\0'), and there may be a null byte at the end.
RAD (Rapid Application Development) of a Serverless application βNotification Serviceβ on modern technologies, e.g. AWS CDK & SAM, AWS Step Functions, TypeScript, VS Code, Open API Top Down Design and Test Driven Development, in order to rapidly build a prototype, or a POC, verify and test some technologies and approaches.
Request Handler => Step Functions (orchestration for Lambda functions, represents a single centralized executable business process, outsources low level operations like retry / exception catch and handle. Another choice is SNS) => Service Providers
Have experienced of Terraform, Serverless, AWS SAM β¦ now this time based on code over configuration principle, what you get is flexibility, predictability and more control. You focus on code you tell the tools what steps it has to complete directly. At the end of day, it is a simple matter of separation of concerns and single responsibility principle.
β’ VS Code for API Spec editing
β’ Postman API, Environment and Mock server, for QA team, then switch to real service in DEV/TEST environment
1
π npm run openapi
β’ openapi-generator generates model classes; typescript-json-validator generates JSON Schema and validator
β’ CDK, is based on CloudFormation but abstract layer on the top of it. It can generates CloudFormation template file template.yaml
1
π cdk synth --no-staging > template.yaml
β’ Demo of local run and debug lambda, with background TSC watch process
1 2 3 4
π npm run watch
π sam local invoke RequestNotification9F9F3C31 -e samples/api-gateway-notification-event.json π sam local invoke RequestNotification9F9F3C31 -e samples/api-gateway-notification-event.json -d 5858
Data validation to make data integrity unbreachable will take a lot time.
Cloud computing and Serverless architecture let developers in fast lane for Application Development. Right now, there are so many low hanging fruit to pick up.
As developers, we should not always think about our comfort zone, we need to think about people who take over your work, think about BAU team to support the application. The codebase is not about you, but about the value that your code brings to others, and the organization that you work for.
Fix our destructive and throwaway economy, save our planet by making products both repairable, durable, environmentally friendly, and by defending our Right to Repair.