<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mahmudul Hasan Nisat</title>
    <description>The latest articles on DEV Community by Mahmudul Hasan Nisat (@nisatevo).</description>
    <link>https://dev.to/nisatevo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1470527%2F62a4bb6c-35a4-4926-96ed-625dcc638187.jpg</url>
      <title>DEV Community: Mahmudul Hasan Nisat</title>
      <link>https://dev.to/nisatevo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nisatevo"/>
    <language>en</language>
    <item>
      <title>An Overview of AWS Global Infrastructure Part-1</title>
      <dc:creator>Mahmudul Hasan Nisat</dc:creator>
      <pubDate>Sat, 30 Nov 2024 23:31:23 +0000</pubDate>
      <link>https://dev.to/nisatevo/an-overview-of-aws-global-infrastructure-part-1-3649</link>
      <guid>https://dev.to/nisatevo/an-overview-of-aws-global-infrastructure-part-1-3649</guid>
      <description>&lt;p&gt;Ever wandered? How &lt;strong&gt;Regions&lt;/strong&gt; &amp;amp; &lt;strong&gt;Zones&lt;/strong&gt; Shape Our Cloud Experience (For example, have you ever wondered how the internet delivers your favorite movies and games so quickly? It is like magic, and different cloud vendors are the magicians working behind the scenes.) &lt;/p&gt;

&lt;p&gt;Now you might say, What do you mean by region, zones, and edge locations? Well, before that, we have to understand what the AWS Global Infrastructure is!!&lt;br&gt;
It's basically &lt;strong&gt;globally distributed hardware and data centers&lt;/strong&gt; that &lt;strong&gt;are physically networked together&lt;/strong&gt; to act as one large resource for the end customer.&lt;/p&gt;

&lt;p&gt;The AWS Global Infrastructure is made up of the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;32 Launched Regions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;102 Availibility Zones&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;115 Direct Connection Locations&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;550+ Points of Presence&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;35 Local Zone&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;29 Wavelength Zone&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdke5jmx43o54e5p2h8ks.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdke5jmx43o54e5p2h8ks.jpg" alt="AWS Global Infrastructure" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.   AWS Regions:&lt;/strong&gt; The image above gives you a good idea of what we are referring to as "&lt;strong&gt;region.&lt;/strong&gt;" Though I'll tell you, &lt;strong&gt;Regions are geographic locations worldwide where AWS hosts its data centers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each AWS Region is named after the region in which it is located. For example, in the United States, there is a Region in Northern Virginia called the Northern Virginia Region. In order to better serve its clients, AWS is constantly growing, with regions in Asia Pacific, Canada, Europe, the Middle East, and South America.&lt;/p&gt;

&lt;p&gt;Every AWS region has a &lt;strong&gt;region code&lt;/strong&gt; and a &lt;strong&gt;geographical name&lt;/strong&gt;. Here are some example of region codes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;us-east-1:&lt;/strong&gt; This is the &lt;strong&gt;first Region&lt;/strong&gt; in the eastern United States, established in 2006. The geographical name for this region is &lt;strong&gt;N. Virginia.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;ap-northeast-1:&lt;/strong&gt; This region is known geographically as &lt;strong&gt;Tokyo&lt;/strong&gt;. It was the first region that was created in the northeast of Asia Pacific.&lt;/p&gt;

&lt;p&gt;The AWS documentation provides a list of the AWS regions and their region codes.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgq7efm1qmpqwvvewx8gk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgq7efm1qmpqwvvewx8gk.png" alt="Regions" width="345" height="831"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each AWS region is separate from the others. To put it another way, your data is never copied between regions without your express permission.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choosing the Right AWS Region&lt;/strong&gt; is one of the most important parts of AWS. Here's how we can choose the right region for us:&lt;br&gt;
Consider four main aspects when deciding which AWS region to host your applications and workloads: latency, price, service availability, and compliance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency:&lt;/strong&gt; Choosing a region that is close to your user base will help us to prevent long wait times for the customers. Synchronous applications such as gaming, telephony, WebSockets, and IoT are significantly affected by higher latency, but even asynchronous workloads, such as e-commerce applications, can suffer from an impact on user connectivity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Prices may vary from one region to another. Internet connectivity, the cost of imported equipment, customs, real estate, and other factors can all have an impact on regional pricing. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Service accessibility:&lt;/strong&gt; Not all services may be accessible in all regions. There is a table in the AWS documentation that lists the regions and the services that are offered in each, &lt;a href="https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/" rel="noopener noreferrer"&gt;click here&lt;/a&gt;. If any service is accessible in every region, then it'll be labeled as "&lt;strong&gt;Global&lt;/strong&gt;"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr1g70ta5tyqzvfqw3ut8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr1g70ta5tyqzvfqw3ut8.png" alt="AWS Global" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data compliance:&lt;/strong&gt; Enterprise businesses frequently have to abide by laws requiring that client information be kept in a particular location. If appropriate, pick a region that satisfies your compliance needs.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2. Availability Zones:&lt;/strong&gt; An Availability Zone is a separate datacenter with redundant power, networking, and connectivity within an AWS region. Typically, a region has three Availability Zones, but the &lt;strong&gt;US_EAST-1 region has 6 AZs&lt;/strong&gt; (the most Availability Zones of any region).&lt;/p&gt;

&lt;p&gt;These Zones are super close, just 50 to 100 kilometers away from each other.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F902bcg5qxby3vrfkuvl8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F902bcg5qxby3vrfkuvl8.png" alt="AZs" width="800" height="386"&gt;&lt;/a&gt;&lt;br&gt;
Here we can see AZ and LZ (Local Zone). &lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Local Zone&lt;/strong&gt; is an extension of an AWS Region that is geographically close to the users. (We'll talk about it in the later blog).&lt;/p&gt;

&lt;p&gt;AWS keep copies of various items, including videos, music, and more. When a user requests something, AWS retrieves it from the nearest pit stop and delivers the content faster to the user. Datacenters within a region will be isolated from one another. However, they will be close enough to ensure low latency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Availability Zones are important ?&lt;/strong&gt;&lt;br&gt;
Availability Zones (AZs) in AWS are important for ensuring high availability, fault tolerance, and scalability. They are isolated data centers within a region that help protect against failures, improve disaster recovery, and allow for horizontal scaling. By distributing resources across multiple AZs, applications can stay online during failures, improve data durability, and handle traffic spikes efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5g6yiemi4rqlfkm6qdg4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5g6yiemi4rqlfkm6qdg4.png" alt="AZ" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AZs also have a code name. Since they’re located inside Regions, they can be addressed by adding a letter to the end of the Region code name. For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;us-east-1a:&lt;/strong&gt; an AZ in us-east-1 (Northern Virginia Region)&lt;br&gt;
&lt;strong&gt;sa-east-1b:&lt;/strong&gt; an AZ in sa-east-1 (São Paulo Region in South America)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cj90uspe8gwo63xe4ta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cj90uspe8gwo63xe4ta.png" alt="AZs" width="754" height="1290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;There's another thing: an availability zone is also linked to a subnet.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When we are launching resources, we do not select the AZ. We select the Subnet that is connected to the AZ.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F27fsh0r4cnce4r1xgvwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F27fsh0r4cnce4r1xgvwm.png" alt="subnet" width="530" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrap Up&lt;/strong&gt;&lt;br&gt;
Depending on the service we use, we need to choose the right Region or AZ for your workload. In the next unit, we'll learn all the other aspects of AWS Global Infrastructure.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>infrastructure</category>
      <category>global</category>
    </item>
    <item>
      <title>Understand Amazon Elastic Compute Cloud (EC2) for launching virtual machines</title>
      <dc:creator>Mahmudul Hasan Nisat</dc:creator>
      <pubDate>Sat, 30 Nov 2024 20:52:13 +0000</pubDate>
      <link>https://dev.to/nisatevo/understand-amazon-elastic-compute-cloud-ec2-for-launching-virtual-machines-3gkc</link>
      <guid>https://dev.to/nisatevo/understand-amazon-elastic-compute-cloud-ec2-for-launching-virtual-machines-3gkc</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrrlmzp9c12awd4kxeem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrrlmzp9c12awd4kxeem.png" alt="AWS EC2" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>ec2</category>
      <category>virtualmachine</category>
    </item>
    <item>
      <title>AWS Certified Cloud Practitioner Exam Study Journey</title>
      <dc:creator>Mahmudul Hasan Nisat</dc:creator>
      <pubDate>Sat, 30 Nov 2024 18:33:27 +0000</pubDate>
      <link>https://dev.to/nisatevo/aws-certified-cloud-practitioner-3gc8</link>
      <guid>https://dev.to/nisatevo/aws-certified-cloud-practitioner-3gc8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;My goal with this series is to use it as a study aid for my preparation for the Cloud Certification Exam. I’ll be updating my AWS articles from time to time as I learn more. The information may not be comprehensive or accurate. If you find any information inaccurate, please leave a comment.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It turns out that I have two posts from this series on another platform. I will leave the links here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://nisat.hashnode.dev/getting-started-with-aws-a-beginners-guide-to-account-creation-iam-and-billing" rel="noopener noreferrer"&gt;Getting Started with AWS: A Beginner's Guide to Account Creation, IAM, and Billing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nisat.hashnode.dev/2024-guide-to-cloud-computing-benefits-and-deployment-models-explained" rel="noopener noreferrer"&gt;2024 Guide to Cloud Computing: Benefits and Deployment Models Explained&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>certification</category>
    </item>
    <item>
      <title>Beware of Mutable Default Arguments in Python</title>
      <dc:creator>Mahmudul Hasan Nisat</dc:creator>
      <pubDate>Fri, 24 May 2024 20:00:36 +0000</pubDate>
      <link>https://dev.to/nisatevo/beware-of-mutable-default-arguments-in-python-3ffa</link>
      <guid>https://dev.to/nisatevo/beware-of-mutable-default-arguments-in-python-3ffa</guid>
      <description>&lt;h1&gt;
  
  
  Beware of Mutable Default Arguments in Python
&lt;/h1&gt;

&lt;p&gt;As Python developers, we often enjoy the flexibility and simplicity that the language offers. However, some features can lead to unexpected behavior if not used carefully. One such feature is mutable default arguments.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Consider the following function:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
python
def test_func(newList, myList=[]):
    for t in newList:
        for f in t:
            myList.append(f)
    return myList

print(test_func([[3, 4, 5], [6, 7, 8]]))  # Outputs: [3, 4, 5, 6, 7, 8]
print(test_func([[9, 10, 11], [12, 13, 14]]))  # Outputs: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]

At first glance, everything seems fine. But notice what happens when the function is called a second time. Instead of getting a fresh list, myList retains the values from the previous call. This is because the default list is created once and shared across all calls to the function.

The Solution:
To avoid this issue, we can use None as the default value and initialize the list inside the function:

def test_func(newList, myList=None):
    if myList is None:
        myList = []
    for t in newList:
        for f in t:
            myList.append(f)
    return myList

print(test_func([[3, 4, 5], [6, 7, 8]]))  # Outputs: [3, 4, 5, 6, 7, 8]
print(test_func([[9, 10, 11], [12, 13, 14]]))  # Outputs: [9, 10, 11, 12, 13, 14]


By doing this, each call to test_func starts with a fresh list, avoiding the unintended side effect of sharing state across function calls.

Conclusion:

Mutable default arguments can lead to subtle bugs that are hard to track down. Always use immutable default arguments or initialize mutable ones inside the function. Happy coding!Feel free to share your thoughts or any other tips you have encountered on this topic!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>python</category>
      <category>problem</category>
    </item>
  </channel>
</rss>
