Update s3-hosted lambda function code without cloudformation

You need to do 2 things: Copy your code to S3 bucket. Don’t need a new object key in the bucket. Just use the existing one Invoke aws-cli’s “aws lambda update-function-code”, by putting s3 bucket /s3 key in the command line Then the function will be updated. You have to do 2nd step because “s3 …

Update s3-hosted lambda function code without cloudformation Read More »

Use git flow (avh) + npm version together

Feature -> Release Action Branches and their versions (before) CLI commands Branches and their versions (after) More details Start a feature develop: 1.0.0-SNAPSHOT.0master: 1.0.0-SNAPSHOT.0 git flow feature start xxxgit flow feature publish xxx feature/xxx: 1.0.0-SNAPSHOT.0develop: 1.0.0-SNAPSHOT.0master: 1.0.0-SNAPSHOT.0 Or just branch from develop Finish a feature feature/xxx: 1.0.0-SNAPSHOT.0develop: 1.0.0-SNAPSHOT.0master: 1.0.0-SNAPSHOT.0 git flow feature finish xxx develop: …

Use git flow (avh) + npm version together Read More »

Code: Download file from backend in an AJAX manner (Typescript)

User story: The backend sends back a file for you to download, using headers such as “Content-Disposition” and “Content-Type: application/pdf” Upon request, the browser will download the file for me in an AJAX manner, so I can show a progress bar If backend sends an error in JSON format, I want to see the error …

Code: Download file from backend in an AJAX manner (Typescript) Read More »

Some thoughts about reusable component design in react

Consider passing in some properties as children,  instead of props . This will make the code looks cleaner: The consumer doesn’t have to build a big “props” object to pass in You will divide a single component into several ones. Each one will a take small props object, which is highly inherent For example, instead …

Some thoughts about reusable component design in react Read More »