All Categories

  • How to Use nconf for Environment Configuration at Node.js

    3/2/2020 -
    This blog shows how to use nconf for Node.js environment configuration. Environment config is needed in any coding language, for instance, the database endpoint for each of the environments, your development, and production should be different.  Install the nconf Now, use nconf is very easy, first add to your solution's dependency package. npm install nconf --save Use the nconf You can write a helper class like following to use nconf. First, you import the package to your file, load json file, then return the nconf. const nconf = require('nconf'); nconf.file('env.json'); exports.config = nconf; This JSON file will be your App's environment configuration, you can put all your configuration dependencies to this JSON file. Later, each of your environments just updates this JSON file to match that environment's config.
    Node.js
  • Use VPC Flow Logs

    3/11/2020 -
    Create Flow logs Select the VPC to want to use flow logs, click action then click Create flow log. Setup Destination log group If you choose to send to CloudWatch logs, you'll have to set up a destination log group. Go to CloudWatch and choose Log groups. Set up IAM role for flow logs Click set up permission on the create VPC flow logs page, this UI will only show on old UI, which will create the following policy to enable flow logs to read and write to cloud watch.
    AWSVPC
  • Create AWS Classic Load Balancer

    3/4/2020 -
    This blog shows how to use AWS classic Load Balancer from scratch, first we need to do some preparation. At the end of the setup, you'll set up 2 EC2 instances with the public subnet. Following are a list of preparation before setup the classic load balancer.
    AWS
  • Blocking Traffic from Specific IP Address with AWS Network ACL

    3/2/2020 -
    This blog shows few ways of use AWS Network ACLs to block traffic to your site. How to blocking traffic from a Specific IP address AWS has few ways to block specific targets to access your site, for example, Network ACL or WAF. So let's assume one of the examples, you have a web site running in EC2 instance as one web server, now there's one IP address you noticed and want to block the traffic. You can use the Network ACL as following. Find the Network ACL from EC2 First, you need to find out the Network ACL from EC2 instance. You can click Subnet from EC2, then click Network ACL. Find the IP address Next, you need to have an IP address. If you want to test your own machine's IPv4 Address, you can either google that what's my IP address or go to https://whatismyipaddress.com/ to check your Public IP address.
    EC2AWSNetwork ACL