Tuesday, August 20, 2024

AWS Networking contd. - NACLs, Subnets, Security Groups

Discussion with ChatGPT about NACLs, Subnets, Security Groups

https://chatgpt.com/c/51ec2d12-d3ad-42e6-b20a-30470c0f442e

(Not a shared link. Have to be logged-in to chat.openai.com)

Monday, August 5, 2024

AWS Networking - Relationship between Region-VPC-AZ-Subnet-EC2

 





























Amongst the following entities - Region, VPC, AZ, Subnet, EC2, which of these are associated with Routing Tables and NACLs?

Routing Tables and Network Access Control Lists (NACLs) are associated with the following entities in AWS:

1. **VPC (Virtual Private Cloud)**:
   - **Routing Tables**: Each VPC has one or more routing tables that control the routing of traffic between the subnets within the VPC and the internet, or other VPCs. These routing tables determine where network traffic from the subnet is directed.
   - **NACLs (Network Access Control Lists)**: NACLs are optional layers of security that act as firewalls for controlling traffic into and out of subnets. You can apply NACLs to each subnet within a VPC, and they provide stateless filtering of ingress and egress traffic at the subnet level.

2. **Subnet**:
   - While subnets themselves don't directly contain routing tables or NACLs, they are associated with them:
     - Each subnet is associated with a routing table from its VPC to manage the flow of traffic out of the subnet.
     - NACLs can be applied to subnets to manage access and traffic flow into and out of the subnet.

**Regions** and **Availability Zones (AZs)** do not directly involve routing tables or NACLs, as these are specifically related to network configurations within VPCs. **EC2 Instances** are affected by these configurations but do not themselves contain or directly manage routing tables or NACLs.


What about Security Groups? Which entity or entities are those associated with?

**Security Groups** in AWS are primarily associated with the following entities:

1. **EC2 Instances**:
   - Security Groups are used to control inbound and outbound traffic at the instance level. They act as a virtual firewall for EC2 instances to regulate allowable traffic.

2. **VPC (Virtual Private Cloud)**:
   - Security Groups are defined at the VPC level and can be associated with any instance in that VPC. While they are created within a VPC, their rules apply to instances they are attached to, not subnets.

Unlike NACLs, which are associated at the subnet level and provide stateless filtering, Security Groups provide stateful filtering and are associated directly with instances, such as EC2 instances, RDS instances, and Elastic Load Balancers within the VPC. This means they remember the state of traffic flows and can automatically allow return traffic without additional rules.

So all network security instruments - Security Groups, Routing Tables, NACLs are defined at the VPC level?

Yes, that's correct! All these network security instruments—Security Groups, Routing Tables, and Network Access Control Lists (NACLs)—are defined at the VPC level in AWS. Here's how each operates within the VPC:

1. **Security Groups**: These are associated with individual instances within the VPC, such as EC2 instances. They control inbound and outbound traffic at the instance level and are stateful, meaning they track the state of network connections.

2. **Routing Tables**: These define the rules for traffic routing within the VPC and between the VPC and other networks. Each subnet in a VPC is associated with a routing table that determines where network traffic is directed.

3. **NACLs (Network Access Control Lists)**: These provide a layer of security that acts as a firewall for controlling traffic into and out of subnets. NACLs are stateless, so they do not keep track of the state of network connections and each packet is processed individually.

All three instruments are configured at the VPC level but apply at different scopes—Security Groups at the instance level, Routing Tables at the subnet level, and NACLs at the subnet level—to provide comprehensive network security and routing management within a VPC.

Saturday, June 1, 2024

Workflow Engine Principles

https://temporal.io/blog/workflow-engine-principles

https://share.transistor.fm/s/65974dd6

Join Jason for another round of “Build Things on Purpose.” This time Jason is joined by Maxim Fateev and Samar Abbas, co-founders of Temporal, to talk about the software and solutions they are developing for orchestrating micro services. Maxim and Samar talk about their joint work in the past on various projects to include the Cadence project, which has laid the foundation for what they are continuing to do at Temporal. Check out this “Build Things” conversation as Maxim and Samar go into the details on the nature of their work at Temporal!

Durable Execution

https://orkes.io/blog/why-your-applications-need-durable-execution/

https://materializedview.io/p/durable-execution-justifying-the-bubble

First heard about it in a podcast featuring Temporal's CEO

System Design: 11 basic & essential concepts

Below is from a post by Kartikeya Sapra on LinkedIn

11 basic & essential concepts:

1. Scalability
- Ensures systems can handle increased load and grow efficiently.

Link → https://lnkd.in/dD-GZpVq

2. Latency vs Throughput
- Balances speed and capacity in system performance.

Link → https://lnkd.in/dscK9g3E

3. CAP Theorem
- Explains the trade-offs between consistency, availability, and partition tolerance in distributed systems.

Link → https://lnkd.in/dFpgDSnY

4. ACID Transactions
- Guarantees reliable database processing through atomicity, consistency, isolation, and durability.

Link → https://lnkd.in/dkkmMu_D

5. Rate Limiting
- Controls the amount of incoming and outgoing traffic to prevent overload and abuse.

Link → https://lnkd.in/dY9NqRG9

6. API Design
- Ensures APIs are user-friendly, efficient, and maintainable.

Link → https://lnkd.in/dTgxGa5i

7. Strong vs Eventual Consistency
- Balances the need for immediate data consistency versus eventual data accuracy in distributed systems.

Link → https://lnkd.in/dQDwa7TQ

8. Distributed Tracing
- Helps monitor and debug complex, distributed systems by tracking requests across multiple services.

Link → https://lnkd.in/dA-3swq2

9. Synchronous vs Asynchronous Communications
- Determines how systems interact, either waiting for responses (synchronous) or continuing independently (asynchronous).

Link → https://lnkd.in/dx2nFDgR

10. Batch Processing vs Stream Processing
- Differentiates between processing large volumes of data at once (batch) and processing data in real-time (stream).

Link → https://lnkd.in/dqGFQppV

11. Fault Tolerance
- Ensures systems remain operational despite failures or errors.

Link → https://lnkd.in/dzKWh4ju

Sunday, March 24, 2024

AI Book - Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD

Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD

https://course.fast.ai/Resources/book.html

testcontainers.com

https://testcontainers.com/

An open source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container.

Sunday, February 25, 2024

c2pa.org - Coalition for Content Provenance and Authenticity

https://c2pa.org/

The Coalition for Content Provenance and Authenticity (C2PA) addresses the prevalence of misleading information online through the development of technical standards for certifying the source and history (or provenance) of media content. C2PA is a Joint Development Foundation project, formed through an alliance between Adobe, Arm, Intel, Microsoft and Truepic.

Tuesday, December 12, 2023

Leetcode type problem - Sub-Arrays problem

 Generate number of sub arrays with a particular sum: E.g. nums = [1,1,1] with sum 2

arr = [1,1,1]
SUM =2
#arr = [1,2,2,3,4,5]
#SUM = 5

sub_arrays = []
arr = arr.sort

arr.each_with_index do |n, index|
  if n == SUM
    sub_arrays << [n]
    next
  end
  rest_of_array = arr[(index+1)..-1]
  temp_arr = [n]

  rest_of_array.each do |m|
    temp_arr << m
    if temp_arr.sum == SUM
      # We found a sub_array!
      sub_arrays << temp_arr
      # There might be duplicates of m, so let us remove m from temp_arr and continue
      temp_arr = temp_arr[0..temp_arr.length-2]
    end
    if temp_arr.sum < SUM
      # do nothing; we can continue to add more elements
    end
    if temp_arr.sum > SUM
      # discard all elements except n
      temp_arr = [n]
    end
  end
end

puts sub_arrays.to_s

Sunday, December 10, 2023

Cryptography Foundations

 Below is an excerpt from the book - Securing Cloud Applications (manning.com)


Tuesday, November 21, 2023

Optimizing HTML to PDF in Node.js

https://blog.logrocket.com/optimizing-html-pdf-node-js

The complete guide to Kubernetes cost management in 2023

https://www.spectrocloud.com/blog/the-complete-guide-to-kubernetes-cost-management

State of Cloud Security

https://www.datadoghq.com/state-of-cloud-security/

Amazon’s free courses on generative AI

https://www.aboutamazon.com/news/aws/aws-free-ai-skills-training-courses

The Architecture Of Serverless Data Systems

https://jack-vanlightly.com/blog/2023/11/14/the-architecture-of-serverless-data-systems

Load Shedding for High Traffic Systems

https://www.codereliant.io/load-shedding/

React Server Components: A comprehensive guide

https://blog.logrocket.com/react-server-components-comprehensive-guide/

Developing an effective CI/CD pipeline for frontend apps

https://blog.logrocket.com/best-practices-ci-cd-pipeline-frontend

Wednesday, October 11, 2023

Rails and JS - No Build for JS

https://world.hey.com/dhh/you-can-t-get-faster-than-no-build-7a44131c

We're making it using vanilla ES6 with import maps for Hotwire, and vanilla CSS with nesting and variables for styling. All running on a delightfully new simple asset pipeline called Propshaft. 

Saturday, September 16, 2023

Rails: class_attribute

https://chat.openai.com/c/388e1263-46a6-4406-b16d-8094b8232dfb

In essence, whenever you find yourself thinking, "I need a class-level configuration that should have a default, but I also want the flexibility to customize it for certain subclasses or instances," class_attribute is a tool you might consider using.

Rails - ActiveRecord - inverse_of

https://chat.openai.com/share/e8f26c7d-d539-4ba9-93b3-52f702ca8909

Rails: Join multiple nested associations

Join multiple nested associations:

https://gist.github.com/abhionlyone/84dec0aa7a5d30b9e2bc6d7bd2094f20

Wednesday, February 15, 2023

How to learn Machine Learning

https://twitter.com/machsci/status/1625569733126033408?s=21&t=Urcac12Ha89dnjd31vAAIg

https://vickiboykis.com/2022/11/10/how-i-learn-machine-learning/

https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html

https://twitter.com/jhoang314/status/1624829824782028806?s=21&t=Urcac12Ha89dnjd31vAAIg

https://www.ninoristeski.com/how-to-find-the-best-resources-on-machine-learning/

...

Start with tabular data and linear/logistic regression. Then grab lightgbm with automl, learn the common explainability methods and focus on anything BUT selecting an algorithm. When you got that, learn all other algorithms in and out and look for model innovations.

...

Just learn BigQuery and it's machine learning capabilities and read books alot and avoid youtube videos as much as possible.

...

Start with SQL, Python. Pick a popular ML library e.g. Sklearn, Keras, XGBoost and apply it to a dataset

...

Start by getting familiar with the fundamentals of machine learning, such as linear algebra, calculus and probability theory. Also read up on popular algorithms to get a better understanding of how they work.

...

Learn statistics and probability a lot of concepts require simple concepts from those fields, if you want to go a little further learn abstract geometry is going to allow you to learn about how nonlinear models implement hyperplanes.

Followers

Blog Archive