Sign in

Offical website,


Sign up a new account in pulumi website since you need a Access Token

Then go to, create new token

Back to terminal, login your pulumi account

You can see which account your logged in by using

Start new project, …

Below is a simple example for createing an s3 bucket

add modules/index.ts

Add dotenv package

and place BUCKET_NAME key which is the name of the bucket name you want

Add an index.ts in root


In terminal, generate ssh key

Will ask you file name to for generate this ssh key, and this example we are going to generate ssh for different git, e.g. bitbucket and github which using different ssh key

Next, setup your ssh config file, which located in your ~/.ssh folder

Here is an example of the config file

# GitHub michaelmaky
Host github-michaelmaky2
HostName …


Install homebrew

Install java

these will be installed into /Library/Java/JavaVirtualMachines/ which is the traditional location on Mac OSX.

For M1 Mac, Since zsh is the default Terminal shell, so place script below either in your ~/zprofile / or ~/.zshenv or ~/.zshrc

alias java8='export JAVA_HOME=$JAVA_8_HOME'
alias java11='export JAVA_HOME=$JAVA_11_HOME'
# default to Java 11

then you can use command java8 or java11 to switch your java runtime…

To enable graphQL in your nestjs api, you can first read the offical document here.

Step 1, install npm package need

declare a simple factory class for graphQL

In app.module.ts, add GraphQL module

and also define .gql under schema

Next, create order.resolver.ts which make graphQL support same request as restful, which define in order.controller.

Use postman to make a request for getOrders, we copy the sample request query and variable below

Here is the result which same as using restful API

The sample code is here, hope this help.

Go to Stripe to create an account

Navigate to left menu > Developers > API keys, there is a publishable key and secret key, publishable key is used in front end below checkout

Imagine there is an checkout form in web / app, you input credit card, CVC, expired month and year in the form and checkout, In stripe, you need to use those information to get the source id of this payment

Below we use postman with the publishable key to get source id

You can copy your publishable key to the environment variables of postman, and request body…

Install mongoose package and create mongo db connection helper, this helper can works fine with local mongodb and mongodb altas


Import mongoose module into App module

Order Module

Generate our first module using generator, ref:

As I need to works with mongodb, I need to rename folders

In this tutorial, I’ll build a simple NodeJS API which will be deployed in AWS Lambda and the endpoints will be exposed using AWS API gateway. The deployment will use Bitbucket pipelines which allow you to preform CICD when code change in a specific branch, also the configuration will be defined in AWS SAM template.

Cloudformation (SAM) allows you to manage your AWS infrastructure using just a yaml file. Using these two tools you can create a solid CD environment from scratch.

Suppose you have an AWS account and now create an IAM user with following policies

Step 1: Setup for s3 website

Refer to here you can setup:

Step 2: Setup DNS, e.g. cloudfare

After setup CNAME of your website host in AWS S3, you can see your website content “Welcome to my website” base on document below

Step 3: Setup IAM user which can access this bucket

Refer to my other tutorial

Step 4: Setup Deployment variables of your repo

Refer to my other tutorial,

Define Deployment variables

Step 5: update package.json script, we use max_old_space_size=2048 since the ci server is not a very powerful machine

Prepare a Security group for elastic cache

Search VPC and you will see below information

Add a new security group which same as this VPC

First Part is about AWS SES setup guileline

Go to AWS Console, enter SES Home

Verify domain

Go to Domains > Verify a New Domain button, enter your domain, it shows picture below and you can use these information by input to your DNS management of this domain, e.g. cloudflare

Normally, within 24 hours or less, AWS SES will finish verify your domain and go back to SES console page, status update to verified


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store