<?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>Forem: Sumbul Naqvi</title>
    <description>The latest articles on Forem by Sumbul Naqvi (@sumbul_naqvi).</description>
    <link>https://forem.com/sumbul_naqvi</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%2F2988577%2Fb1bfe99b-445d-4585-ac7c-c7755f5691f9.png</url>
      <title>Forem: Sumbul Naqvi</title>
      <link>https://forem.com/sumbul_naqvi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sumbul_naqvi"/>
    <language>en</language>
    <item>
      <title>Story of AWS Storage - Understanding by asking and answering!</title>
      <dc:creator>Sumbul Naqvi</dc:creator>
      <pubDate>Sat, 04 Oct 2025 08:35:52 +0000</pubDate>
      <link>https://forem.com/sumbul_naqvi/story-of-aws-storage-understanding-by-asking-and-answering-1jm7</link>
      <guid>https://forem.com/sumbul_naqvi/story-of-aws-storage-understanding-by-asking-and-answering-1jm7</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%2F4qarfk0u1l7365mrjbf5.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%2F4qarfk0u1l7365mrjbf5.png" alt=" " width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two main members/types of storage in AWS Storage family, &lt;strong&gt;Uncle (block)&lt;/strong&gt; and &lt;strong&gt;Aunty (object)&lt;/strong&gt;. Who storage information depending upon their nature and temperament. And you need to keep their nature in mind while trying to retrieve information from them. 😉&lt;/p&gt;

&lt;p&gt; If you give any information (say 1GB) to &lt;strong&gt;uncle/block&lt;/strong&gt;, he is easy to go guy. What happens is that this file is split into fixed size chunks of data and then stored. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aunty/Object&lt;/strong&gt; storage, on the other hand, treats each file like a single unit of data. This might seem like a small difference, but it can change how you access and work with your data.&lt;/p&gt;

&lt;p&gt;Let's say I want to change one character out of that 1GB file. If my file is stored in block storage, changing that one character is simple, mainly because we can change the block, or the piece of the file that the character is in, and leave the rest of the file alone. &lt;strong&gt;Uncle&lt;/strong&gt; is carefree 😊&lt;br&gt;
 Whereas, in object storage, if I want to change that one character, I instead have to update the entire file. &lt;strong&gt;Aunty&lt;/strong&gt; mentality you know everything is treated as an object. Hundreds of questions asked and change is not easy. 😎&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Therefore for our static data, like the employee photos, will most likely be accessed often, but modified rarely, storing in object storage is fine.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;For more frequently updated data or data that has high transaction rates, like our application or system files, block storage will perform better.&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Jokes apart, I will be giving a detailed view of different concepts related to Storage, with respect to AWS as I move forward using my standard way of asking and answering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Lets try understanding the Storage Solutions given by AWS by asking and answering few questions:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 1-&lt;/strong&gt; How to choose the right storage service for your needs?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; It depends upon What we want to store, How we want to store and How often we want it to access it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 2-&lt;/strong&gt; Into how many categories, AWS storage services can be grouped?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; AWS storage services are grouped into three categories: file storage, block storage, and object storage. &lt;br&gt;
 In file storage (EFS), data is stored as files in a hierarchy. In block storage (EBS), data is stored in fixed-size blocks. And in object storage (S3), data is stored as objects in buckets.&lt;/p&gt;

&lt;h2&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%2Fjv4speib24k419z5stfm.png" alt=" " width="800" height="216"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 3-&lt;/strong&gt; What is the main difference between file storage and object storage?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; In object storage, files are stored as objects. Objects, much like files, are treated as a single, distinct unit of data when stored. However, unlike file storage, these objects are stored in a bucket using a flat structure, meaning there are no folders, directories, or complex hierarchies. Each object contains a unique identifier. This identifier, along with any additional metadata, is bundled with the data and stored.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 4-&lt;/strong&gt; Explain Amazon Elastic File System.&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Amazon Elastic File System(Amazon EFS) is file system that automatically grows and shrinks as you add and remove files. There is no need for provisioning or managing storage capacity and performance. Amazon EFS can be used with any number of AWS compute services and on-premises resources. Amazon EFS can provide consistent performance to each compute instance. EFS works with EC2 instances in multi-AZ.&lt;br&gt;
It is managed service, designed to provide serverless, fully elastic file storage that lets you share file data without provisioning or managing storage capacity and performance. It is the only cloud-native shared file system with fully automatic lifecycle management.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 5-&lt;/strong&gt; When should I use Amazon EFS vs. Amazon Elastic Block Store (Amazon EBS) vs. Amazon S3?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; &lt;br&gt;
 &lt;strong&gt;EFS&lt;/strong&gt; is a file storage service for use with Amazon compute (EC2, containers, serverless) and on-premises servers. EFS provides a file system interface, file system access semantics (such as strong consistency and file locking), and concurrently accessible storage for up to thousands of EC2 instances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon EBS&lt;/strong&gt; is a block-level storage service for use with EC2. EBS can deliver performance for workloads that require the lowest-latency access to data from a single EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon S3&lt;/strong&gt; is an object storage service. S3 makes data available through an internet API that can be accessed anywhere.&lt;br&gt;
 Note: Unlike Amazon EBS, Amazon Simple Storage Service (Amazon S3) is a standalone storage solution that isn't tied to compute.&lt;/p&gt;

&lt;h2&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%2Fdypdgxmuih6q4j685qnl.png" alt=" " width="800" height="245"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 6-&lt;/strong&gt; How does pricing works in Amazon S3?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; As far as S3 pricing is concerned, you pay for all bandwidth into and out of Amazon S3, except for the following:&lt;br&gt;
 • Data transferred out to the internet for the first 100GB per month, aggregated across all AWS Services and Regions (except China and GovCloud)&lt;br&gt;
 • Data transferred in from the internet.&lt;br&gt;
 • Data transferred between S3 buckets in the same AWS Region. &lt;br&gt;
 • Data transferred from an Amazon S3 bucket to any AWS service(s) within the same AWS Region as the S3 bucket (including to a different account in the same AWS Region).&lt;br&gt;
 • Data transferred out to Amazon CloudFront (CloudFront).&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 7-&lt;/strong&gt; Compare the cost between the basic storage option available.&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt;&lt;/p&gt;

&lt;h2&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%2F50bz8nzyeyit1yzp1bwe.png" alt=" " width="800" height="325"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 8-&lt;/strong&gt; What the the few performance parameters with respect to storage?&lt;br&gt;
Ans-&lt;/p&gt;

&lt;h2&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%2Fkq78ammua1t2tpbbuklw.png" alt=" " width="800" height="167"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 9-&lt;/strong&gt; Explain Availability and Durability with respect to storage?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Durability refers to how safe data is from being lost, while data availability refers to how often you can access your stored data.&lt;/p&gt;

&lt;h2&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%2F30hfktb2bn4a1x8in62p.png" alt=" " width="800" height="273"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 10-&lt;/strong&gt; Few use cases of above?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Few use cases of EBS, S3 and EFS are following:&lt;/p&gt;

&lt;h2&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%2Fjfifhgs4j4fpwlecutt9.png" alt=" " width="800" height="310"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 11-&lt;/strong&gt; What makes AWS S3 most sort after choice for storage?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Some of the benefits of AWS S3 are:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Durability:&lt;/em&gt;&lt;/strong&gt; S3 provides 99.999999999 percent durability.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Low cost:&lt;/em&gt;&lt;/strong&gt; S3 lets you store data in a range of "storage classes." These classes are based on the frequency and immediacy you require in accessing files.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Scalability:&lt;/em&gt;&lt;/strong&gt; S3 charges you only for what resources you actually use, and there are no hidden fees or overage charges. You can scale your storage resources to easily meet your organization's ever-changing demands.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Availability:&lt;/em&gt;&lt;/strong&gt; S3 offers 99.99 percent availability of objects&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Security:&lt;/em&gt;&lt;/strong&gt; S3 offers an impressive range of access management tools and encryption features that provide top-notch security.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Flexibility:&lt;/em&gt;&lt;/strong&gt; S3 is ideal for a wide range of uses like data storage, data backup, software delivery, data archiving, disaster recovery, website hosting, mobile applications, IoT devices, and much more.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Simple data transfer:&lt;/em&gt;&lt;/strong&gt; You don't have to be an IT genius to execute data transfers on S3. The service revolves around simplicity and ease of use.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 12-&lt;/strong&gt; Differentiate between AWS Buckets vs Objects?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; An object consists of data, key (assigned name), and metadata. A bucket is used to store objects. When data is added to a bucket, Amazon S3 creates a unique version ID and allocates it to the object.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 13-&lt;/strong&gt; What are the different storage classes offered by Amazon S3?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Amazon S3 offers a range of storage classes designed for different use cases:&lt;br&gt;
&lt;strong&gt;S3 Standard&lt;/strong&gt; for general-purpose storage of frequently accessed data&lt;br&gt;
&lt;strong&gt;S3 Intelligent-Tiering&lt;/strong&gt; for data with unknown or changing access patterns&lt;br&gt;
&lt;strong&gt;S3 Standard-Infrequent Access (S3 Standard-IA)&lt;/strong&gt; and S*&lt;em&gt;3 One Zone-Infrequent Access (S3 One Zone-IA)&lt;/em&gt;* for long-lived, but less frequently accessed data&lt;br&gt;
&lt;strong&gt;S3 Glacier Instant Retrieval&lt;/strong&gt; for long-lived data that is rarely accessed and requires retrieval in milliseconds.&lt;br&gt;
&lt;strong&gt;S3 Glacier Flexible Retrieval (Formerly S3 Glacier)&lt;/strong&gt; for archive data that is accessed 1–2 times per year and is retrieved asynchronously.&lt;br&gt;
&lt;strong&gt;S3 Glacier Deep Archive (S3 Glacier Deep Archive)&lt;/strong&gt; for long-term archive and digital preservation.&lt;br&gt;
&lt;strong&gt;One Zone-IA Storage Class:&lt;/strong&gt; It can be used where the data is infrequently accessed and stored in a single region.&lt;/p&gt;

&lt;h2&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%2Fb8j2auitk5ofh69oen1s.png" alt=" " width="800" height="356"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 14-&lt;/strong&gt; What is an Amazon EFS Access Point?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; An EFS Access Point is a network endpoint that users and applications can use to access an EFS file system and enforce file- and folder- level permissions (POSIX) based on fine-grained access control and policy-based permissions defined in IAM.&lt;br&gt;
 When you create an Amazon EFS Access Point, you can configure an operating system user and group, and a root directory for all connections that use it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 15-&lt;/strong&gt; What is Amazons solution for windows ?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Amazon FSx is a fully managed service that offers reliability, security, scalability, and a broad set of capabilities that make it convenient and cost effective to launch, run, and scale high-performance file systems in the cloud. &lt;br&gt;
With Amazon FSx, you can choose between four widely used file systems: Lustre, NetApp ONTAP, OpenZFS, and Windows File Server. You can choose based on your familiarity with a file system or based on your workload requirements for feature sets, performance profiles, and data management capabilities.&lt;/p&gt;

&lt;h2&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%2Fhmf19rs3f8v96t0289ta.png" alt=" " width="800" height="286"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 16-&lt;/strong&gt; Briefly explain the services in the Amazon FSx data storage family.&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; &lt;strong&gt;Amazon FSx&lt;/strong&gt; data storage family come in four options that align to popular file systems:&lt;br&gt;
· Amazon FSx for Windows File Server provides fully managed Microsoft Windows file servers, backed by a fully native Windows file system.&lt;br&gt;
· Amazon FSx for Lustre allows you to launch and run the high-performance Lustre file system.&lt;br&gt;
· Amazon FSx for OpenZFS a fully managed file storage service that enables you to move data to AWS from on-premises ZFS or other Linux-based file servers.&lt;br&gt;
· Amazon FSx for NetApp ONTAP a fully managed service that provides highly reliable, scalable, high-performing, and feature-rich file storage built on NetApp's popular ONTAP file system.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 17-&lt;/strong&gt; What are AWS Storage Gateway ?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; AWS Storage Gateway is like a bridge between on-premises data and cloud data.&lt;br&gt;
 Basically Storage Gateway is of following types:&lt;br&gt;
 • S3 File Gateway &lt;br&gt;
 • FSx File Gateway &lt;br&gt;
 • Volume Gateway &lt;br&gt;
 • Tape Gateway&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%2Fc3nk504xruacstp6b312.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%2Fc3nk504xruacstp6b312.png" alt=" " width="800" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&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%2Fd5i721t5szthm5anfcs4.png" alt=" " width="800" height="434"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 18-&lt;/strong&gt; What is Amazon EC2 instance store ?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Amazon Elastic Compute Cloud (Amazon EC2) instance store provides temporary block-level storage for an instance. This storage is located on disks that are physically attached to the host computer. This ties the lifecycle of the data to the lifecycle of the EC2 instance. If you delete the instance, the instance store is also deleted. Because of this, instance store is considered ephemeral block storage. This is preconfigured storage that exists on the same physical server that hosts the EC2 instance and cannot be detached from Amazon EC2. You can think of it as a built-in drive or RAM for your EC2 instance.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 19-&lt;/strong&gt; What is difference between EBS and instance store?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; We use the instance store for temporary storage. Data that's stored in instance store volumes isn't persistent through instance stops, terminations, or hardware failures. For data that you want to retain longer, or if you want to encrypt the data, use Amazon EBS volumes instead.&lt;br&gt;
 Thus, we can say , EBS is like HD and instance store are like RAM of our system.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 20-&lt;/strong&gt; How much data can I store in Amazon S3?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; The total volume of data and number of objects you can store in Amazon S3 are unlimited. Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 TB. The largest object that can be uploaded in a single PUT is 5 GB. For objects larger than 100 MB, customers should consider using the multipart upload capability.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 21-&lt;/strong&gt; What is S3 Transfer Acceleration?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Transfer Acceleration is designed for specific use cases, to optimize transfer speed from across the world into S3 buckets. Transfer Acceleration takes advantage of the globally distributed edge locations in Amazon CloudFront. As the data arrives at an edge location, the data is routed to Amazon S3 over an optimized network path. We enable transfer accelartion at bucket level. It this, creates fast, easy, and secure transfers of files over long distances between your client and your Amazon S3 bucket.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 22-&lt;/strong&gt; What is the difference between AWS Global Accelerator and S3 transfer Acceleration?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; S3 Transfer Acceleration helps speed up long-distance object transfers between S3 buckets, while Global Accelerator helps manage traffic across multiple AWS regions. AWS Global Accelerator is a networking service that helps you improve the availability, performance, and security of your public applications.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 23-&lt;/strong&gt; What are S3 lifecycle policies? &lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Lifecycle policies help manage and automate the life of your objects within S3, preventing you from leaving data unnecessarily available. They make it possible to select cheaper storage options if your data needs to be retained, while at the same time, adopting additional security control from Glacier.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 24-&lt;/strong&gt; What is multipart upload in S3?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Multipart upload allows you to upload a single object as a set of parts. Each part is a contiguous portion of the object's data. You can upload these object parts independently and in any order.&lt;br&gt;
This is useful if you have files larger than 5GB, which is currently the maximum size for a single PUT operation in S3. Multipart uploads also offer enhanced throughput and the ability to stop and resume uploads if there are any network issues.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 25-&lt;/strong&gt; What is difference between AWS Global Accelerator and CloudFront?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; CloudFront uses Edge Locations to cache content while Global Accelerator uses Edge Locations to find an optimal pathway to the nearest regional endpoint. CloudFront is designed to handle HTTP protocol meanwhile Global Accelerator is best used for both HTTP and non-HTTP protocols such as TCP and UDP.&lt;/p&gt;

&lt;h2&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%2Fmsgr14hm1zenhdtcsm0b.png" alt=" " width="800" height="285"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 26-&lt;/strong&gt; Explain the concept of Data Sync?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; Data Sync is used to move large amount of data to and from :&lt;br&gt;
 • On-premises / other cloud to AWS (NFS, SMB, HDFS, S3 API…) - needs agent.&lt;br&gt;
 • AWS to AWS (different storage services) - no agent needed &lt;br&gt;
 The task of replication tasks can be scheduled hourly, daily, weekly. And file permissions and metadata are preserved (NFS POSIX, SMB…) One agent task can use 10 Gbps, can setup a bandwidth limit.&lt;/p&gt;

&lt;h2&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%2Flqg08i1vfjjzqm3kctr2.png" alt=" " width="800" height="340"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Que 27-&lt;/strong&gt; What is the snow family in AWS?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; The AWS Snow Family is a service that helps customers who need to run operations in austere, non-data center environments, and in locations where there's no consistent network connectivity.&lt;br&gt;
 The Snow Family (comprised of AWS Snowcone, Snowball, and AWS Snowmobile) oﬀers a number of physical devices and capacity profiles, most with built-in computing capabilities.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Que 28-&lt;/strong&gt; How do I choose between Snow Family and other AWS data migration services?&lt;br&gt;
&lt;strong&gt;Ans-&lt;/strong&gt; When there are no network capacity restrictions, the services offered by AWS Storage Gateway and AWS Direct Connect are appropriate choices. Whether linked to a network or not, the Snow Family of Services offers suitable options for the most effective data transfer methods. To assist you in moving data via networks, highways, and technological partners, AWS provides a variety of solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&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%2Ff1k7dpv4gyy6v05qr0o5.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%2Ff1k7dpv4gyy6v05qr0o5.png" alt=" " width="800" height="301"&gt;&lt;/a&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%2Fpgeaicpfbkdff9pl53u5.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%2Fpgeaicpfbkdff9pl53u5.png" alt=" " width="800" height="310"&gt;&lt;/a&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%2Fdavzx1pb7h3it3r9o9zz.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%2Fdavzx1pb7h3it3r9o9zz.png" alt=" " width="800" height="445"&gt;&lt;/a&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%2F0r8ydplswgr91qcvcb29.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%2F0r8ydplswgr91qcvcb29.png" alt=" " width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope, this article helps in adding to your knowledge and understanding of AWS storage.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Sumbul&lt;/p&gt;

</description>
      <category>aws</category>
      <category>storage</category>
      <category>s3</category>
      <category>ebs</category>
    </item>
    <item>
      <title>Amazon SageMaker Built-in Models &amp; all about ML Lifecycle in action- Mini Project.</title>
      <dc:creator>Sumbul Naqvi</dc:creator>
      <pubDate>Fri, 19 Sep 2025 20:19:31 +0000</pubDate>
      <link>https://forem.com/sumbul_naqvi/amazon-sagemaker-built-in-models-all-about-ml-lifecycle-in-action-mini-project-4dlp</link>
      <guid>https://forem.com/sumbul_naqvi/amazon-sagemaker-built-in-models-all-about-ml-lifecycle-in-action-mini-project-4dlp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Machine learning or ML&lt;/strong&gt; can be complex. We can breakdown this complexity to an extent by thinking of ML as a lifecycle. Like a baby growing into infant to adolecent and finally a mature adult .&lt;br&gt;
This growth of ML problem from our aim or goal to a functional solution structured around lifecycle is an iterative process, complete with best practices to help our machine learning projects succeed. &lt;/p&gt;

&lt;p&gt;💡 ML lifecycle includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Business goal identification&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ML problem formulating&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data processing (collection, preprocessing, feature engineering)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model/Solution development (training, tuning, evaluation)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model deployment (inference, prediction)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model monitoring&lt;/p&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%2F3hq7w5ltwj5mjxpak5n6.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%2F3hq7w5ltwj5mjxpak5n6.png" alt=" " width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some of these steps, such as data processing, deployment, and monitoring, are iterative processes that you might cycle through as an ML engineer, often in the same machine learning project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lets throw some light into these phases of ML development.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✔️ &lt;strong&gt;Business goal Identification&lt;/strong&gt;&lt;br&gt;
We should have a clear idea of the problem for which we are considering ML solution, plus the business value(measurable) we aim to be gained by solving that problem. &lt;/p&gt;

&lt;p&gt;✔️ &lt;strong&gt;ML problem framing&lt;/strong&gt;&lt;br&gt;
In this phase, the business problem is framed as a machine learning problem: Given aset of data or observations, what should be predicted (known as a label or target variable). &lt;br&gt;
Determining what to predict and how performance and error metrics must be optimized is a key step in this phase.&lt;/p&gt;

&lt;p&gt;✔️ &lt;strong&gt;Data processing&lt;/strong&gt; is foundational to training an accurate ML model. Here we explore the specifics of collecting, preparing, and engineering features from raw data followed by &lt;strong&gt;EDA **(Exploratory Data Analysis). Thus, main aim here is to convert data into a usable format.&lt;br&gt;
**Data Collection:&lt;/strong&gt; Collect data should be relevant, diverse and sufficient.&lt;br&gt;
&lt;strong&gt;Data Cleaning:&lt;/strong&gt; Address issues such as missing values, outliers and inconsistencies in the data.&lt;br&gt;
&lt;strong&gt;Data Preprocessing:&lt;/strong&gt; Standardize formats, scale values and encode categorical variables for consistency.&lt;br&gt;
&lt;strong&gt;EDA:&lt;/strong&gt; is used to uncover insights and understand the dataset's structure. During EDA patterns, trends and insights are provided using statistical and visual tools.&lt;/p&gt;

&lt;p&gt;✔️ &lt;strong&gt;Model development&lt;/strong&gt; includes model building, training, tuning and evaluation. Our aim is developing a model that performs a specific task or solves a particular problem.&lt;/p&gt;

&lt;p&gt;✔️ &lt;strong&gt;Deploying trained models&lt;/strong&gt; into production for making predictions and inferences talks about deployment strategies on AWS. These strategies help with integrating models into production environments.&lt;/p&gt;

&lt;p&gt;✔️ Finally, &lt;strong&gt;Monitoring models&lt;/strong&gt; after they are deployed into the production environment is an important task for implementing robust monitoring systems, facilitating early detection of deviations, and supporting timely mitigation measures.&lt;/p&gt;
&lt;h2&gt;
  
  
  Well-Architected machine learning design principles to facilitate good design in the cloud
&lt;/h2&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%2F31lu3atdgqvssb5nm8wo.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%2F31lu3atdgqvssb5nm8wo.png" alt=" " width="800" height="677"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡Well-Architected machine learning design principles, often guided by frameworks like the AWS Well-Architected Framework's Machine Learning Lens, aim to facilitate good design in the cloud by focusing on specific considerations for ML workloads. Few ML design principles are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assign ownership-&lt;/strong&gt; Apply the right skills and the right number of resources along with accountability and empowerment to increase productivity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Provide protection-&lt;/strong&gt; Apply security controls to systems and services hosting model data, algorithms, computation, and endpoints. This ensures secure and uninterrupted operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable resiliency-&lt;/strong&gt; Ensure fault tolerance and the recoverability of ML models through version control, traceability, and explainability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable reusability-&lt;/strong&gt; Use independent modular components that can be shared and reused. This helps enable reliability, improve productivity, and optimize cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable reproducibility-&lt;/strong&gt; Use version control across components, such as infrastructure, data, models, and code. Track changes back to a point-in-time release. This approach enables model governance and audit standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optimize resources-&lt;/strong&gt; Perform trade-off analysis across available resources and configurations to achieve optimal outcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduce cost-&lt;/strong&gt; Identify the potentials for reducing cost through automation or optimization, analyzing processes, resources, and operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable automation-&lt;/strong&gt; Use technologies, such as pipelining, scripting, and continuous integration (CI), continuous delivery (CD), and continuous training (CT), to increase agility, improve performance, sustain resiliency, and reduce cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable continuous improvement-&lt;/strong&gt; Evolve and improve the workload through continuous monitoring, analysis, and learning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimize environmental impact-&lt;/strong&gt; Establish sustainability goals and understand the impact of ML models. Use managed services and adopt efficient hardware and software and maximize their utilization.&lt;/p&gt;
&lt;h2&gt;
  
  
  How does the model work?
&lt;/h2&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%2F89f93ft10wj1por89izn.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%2F89f93ft10wj1por89izn.png" alt=" " width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡It focuses on two key components of the model: &lt;strong&gt;features&lt;/strong&gt; and &lt;strong&gt;weights&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt; are identified parts of your dataset that are important in determining accurate outcomes. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weights&lt;/strong&gt; represent how important an associated feature is for determining the accuracy of that outcome. A higher likelihood of accuracy results in a higher weight.&lt;/p&gt;

&lt;p&gt;For instance if we want a recommendation system and want model to predict whether particular model of car is worth buying. We will form a mathemetical equation in form (&lt;strong&gt;y= mx +c&lt;/strong&gt;) say:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;y= m1x1 +m2x2 +m3x3 + c;&lt;/strong&gt;&lt;br&gt;
Where, &lt;strong&gt;x&lt;/strong&gt; can be set of &lt;strong&gt;features **(cost, make, type etc.) and **m&lt;/strong&gt; is the &lt;strong&gt;weights&lt;/strong&gt; we assign to each feature.&lt;/p&gt;

&lt;p&gt;This model only recommends products with a total value greater than one (say). It does a quick calculation of its features and weights, and produces a final value of 1.05. Product Y is an acceptable recommendation. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;We can see given a data (labelled or unlabelled) model is trained to make predictions initially on test data. Once its trained we can use it on actual data.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Developing ML Solutions with SageMaker Studio
&lt;/h2&gt;

&lt;p&gt;✔️ 𝐀𝐦𝐚𝐳𝐨𝐧 𝐒𝐚𝐠𝐞𝐌𝐚𝐤𝐞𝐫 𝐢s managed machine learning (ML) service used to build and train ML models and deploy them right away into a production-ready hosted environment.&lt;br&gt;
✔️ While A𝐦𝐚𝐳𝐨𝐧 𝐁𝐞𝐝𝐫𝐨𝐜𝐤 is designed for use cases where you want to build Gen AI applications without investing heavily in custom model development.&lt;br&gt;
SageMaker AI is a good choice for unique or s𝐩𝐞𝐜𝐢𝐚𝐥𝐢𝐳𝐞𝐝 𝐀𝐈/ML needs that require custom-built models.&lt;/p&gt;

&lt;p&gt;Let’s get started with our task for today.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
a) Sign into the AWS Management Console.&lt;br&gt;
b) Create a SageMaker notebook instance, open conda_python3&lt;br&gt;
c) Prepare the Dataset and Upload the data to S3&lt;br&gt;
d) Train a model using SageMaker’s built-in XGBoost&lt;br&gt;
e) Train a model using Scikit-Learn Random Forest &lt;br&gt;
f) Deploy the model and make predictions.&lt;br&gt;
g) Clean-Up the resource&lt;br&gt;
h) Check data in S3&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%2Fpi49j7bcuyontams87xj.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%2Fpi49j7bcuyontams87xj.png" alt=" " width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a) 👉 Sign into the AWS Management Console.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sign In into AWS Management Console, make the default AWS region as &lt;strong&gt;US East (N. Virginia) Us-East-1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b) 👉 Create a SageMaker notebook instance, open conda_python3.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Amazon SageMaker AI&lt;/strong&gt; by clicking on the Services menu at the top, then click on &lt;strong&gt;Amazon SageMaker AI&lt;/strong&gt;. Then, click on **Notebooks **on the left panel.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Create notebook Instance&lt;/strong&gt; button.&lt;/li&gt;
&lt;/ol&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%2Fe2wmh16e0p90eqkmrn1j.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%2Fe2wmh16e0p90eqkmrn1j.png" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For the Notebook instance settings section,
Notebook instance name: Enter &lt;strong&gt;Instance-BuiltIn-Model&lt;/strong&gt;
Notebook instance type: Select &lt;strong&gt;ml.t2.medium&lt;/strong&gt;
IAM role (existing): &lt;strong&gt;AmazonSagemakeroRole-(RANDOMNUMBER)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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%2Fw5myrjubc2ptcsr754oc.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%2Fw5myrjubc2ptcsr754oc.png" alt=" " width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leave other options as default, click on the &lt;strong&gt;Create notebook instance&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;It will take up to &lt;strong&gt;5 minutes&lt;/strong&gt; for the notebook instance to be up and running. Wait until the Status changes to &lt;strong&gt;InService&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%2F9i4k19y38armrdgrxcup.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%2F9i4k19y38armrdgrxcup.png" alt=" " width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on the &lt;strong&gt;Open JupyterLab&lt;/strong&gt; button. You will be redirected to the run environment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Select &lt;strong&gt;conda_python3&lt;/strong&gt; kernel.&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%2F4tjiqmrqsb0vbj5b1zo3.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%2F4tjiqmrqsb0vbj5b1zo3.png" alt=" " width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Name: &lt;strong&gt;SageMaker_ML_Lab.ipynb&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c) 👉 Prepare the Dataset and Upload the data to S3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We will be using &lt;strong&gt;California Housing&lt;/strong&gt; data. Its globally available for experimenting, with the help of &lt;strong&gt;fetch_california_housing()&lt;/strong&gt; function.&lt;/p&gt;

&lt;p&gt;Copy the below code in cell for execution and run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np
import pandas as pd
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
import sagemaker
from sagemaker import get_execution_role

# Load California housing dataset
california = fetch_california_housing()
X = pd.DataFrame(california.data, columns=california.feature_names)
y = pd.DataFrame(california.target, columns=["MedHouseVal"])

# Split into train and test
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

# Save to CSV (SageMaker expects CSV format)
train_data = pd.concat([y_train, X_train], axis=1)
test_data = pd.concat([y_test, X_test], axis=1)

train_data.to_csv("california_train.csv", index=False, header=False)
test_data.to_csv("california_test.csv", index=False, header=False)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation of above code:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Import libraries required:&lt;/strong&gt;&lt;br&gt;
Numpy and Pandas for numerical and tabular data handling.&lt;br&gt;
Sklearn for functions and scientific calculations.&lt;br&gt;
Sagemaker for interacting with AWS SageMaker services&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Functions Used:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;fetch_california_housing()&lt;/strong&gt;- to load a real-world regression dataset with housing features (e.g., income, location).&lt;br&gt;
&lt;strong&gt;train_test_split()&lt;/strong&gt;- to divide the dataset so that part is used for training and the rest for testing.&lt;br&gt;
&lt;strong&gt;get_execution_role()&lt;/strong&gt;- to allow SageMaker to securely access AWS resources like S3 and training instances.&lt;/p&gt;

&lt;p&gt;Note: The dataset contains features such as: MedInc, HouseAge, AveRooms, etc.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;target variable&lt;/strong&gt; is the median house value (in $100,000s).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here we,&lt;br&gt;
Assign the &lt;strong&gt;features&lt;/strong&gt; to a DataFrame X.&lt;br&gt;
Assign the &lt;strong&gt;target values&lt;/strong&gt; to a DataFrame y.&lt;br&gt;
Use &lt;strong&gt;80%&lt;/strong&gt; of the data for &lt;strong&gt;training&lt;/strong&gt; the model.&lt;br&gt;
Use &lt;strong&gt;20%&lt;/strong&gt; of the data to &lt;strong&gt;evaluate model performance&lt;/strong&gt;.&lt;br&gt;
Set &lt;strong&gt;random_state=42&lt;/strong&gt; in &lt;strong&gt;train_test_split()&lt;/strong&gt; to ensure reproducibility.&lt;br&gt;
Place the &lt;strong&gt;label/target&lt;/strong&gt; in the first column of the &lt;strong&gt;CSV&lt;/strong&gt; file, as expected by &lt;strong&gt;SageMaker&lt;/strong&gt;.&lt;br&gt;
Remove headers from the &lt;strong&gt;CSV&lt;/strong&gt; files because the &lt;strong&gt;XGBoost&lt;/strong&gt; built-in algorithm does not expect them.&lt;br&gt;
Later save the files locally to be uploaded to &lt;strong&gt;Amazon S3&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fveup64encz7l6uyga3uc.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%2Fveup64encz7l6uyga3uc.png" alt=" " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Upload the data to S3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to your &lt;strong&gt;S3&lt;/strong&gt; console and create your bucket. Copy its name and paste it into the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import boto3
import sagemaker

# Initialize S3 client
s3 = boto3.client('s3')

bucket_name = '&amp;lt;Your-S3-Bucket_name&amp;gt;'  # Replace with your bucket name
prefix = 'california-housing'

# Upload to S3 using SageMaker session
sagemaker_session = sagemaker.Session()

train_path = sagemaker_session.upload_data(path='california_train.csv', bucket=bucket_name, key_prefix=prefix)
test_path = sagemaker_session.upload_data(path='california_test.csv', bucket=bucket_name, key_prefix=prefix)

print(f"Training data uploaded to: {train_path}")
print(f"Test data uploaded to: {test_path}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fzo2xyihjt8e2qn9x3dht.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%2Fzo2xyihjt8e2qn9x3dht.png" alt=" " width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;br&gt;
&lt;strong&gt;SageMaker **jobs read data directly from **Amazon S3&lt;/strong&gt;, not from your local machine.&lt;br&gt;
&lt;strong&gt;upload_data()&lt;/strong&gt; handles the transfer of local CSVs to S3.&lt;br&gt;
prefix determines the folder path inside the S3 bucket.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;d) 👉 Train a model using SageMaker’s built-in XGBoost&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from sagemaker.amazon.amazon_estimator import get_image_uri

# Get XGBoost container (adjust region if needed)
container = get_image_uri(sagemaker_session.boto_region_name, 'xgboost', '1.0-1')

# Define SageMaker estimator
xgb = sagemaker.estimator.Estimator(
    container,
    get_execution_role(),
    instance_count=1,
    instance_type='ml.m5.large',
    output_path=f's3://{bucket_name}/{prefix}/output',
    sagemaker_session=sagemaker_session
)

# Set hyperparameters (for regression)
xgb.set_hyperparameters(
    objective="reg:squarederror",
    num_round=100,
    max_depth=5,
    eta=0.2,
    gamma=4,
    min_child_weight=6,
    subsample=0.8
)

# Define data channels
train_input = sagemaker.TrainingInput(train_path, content_type='csv')
test_input = sagemaker.TrainingInput(test_path, content_type='csv')

# Train the model
xgb.fit({'train': train_input, 'validation': test_input})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SageMaker **uses pre-built containers (Docker images) to run popular algorithms like **XGBoost&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fetch the URI of the &lt;strong&gt;XGBoost&lt;/strong&gt; container image for your AWS region.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use version ‘1.0–1’ of the &lt;strong&gt;XGBoost container&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use an Estimator, a SageMaker abstraction that manages training jobs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Key parameters to set in the Estimator include:&lt;br&gt;
&lt;strong&gt;container&lt;/strong&gt;: the machine learning algorithm to use (XGBoost here).&lt;br&gt;
&lt;strong&gt;instance_type&lt;/strong&gt;: the compute resource (e.g., ml.m5.large which has 2 vCPUs and 8 GiB RAM).&lt;br&gt;
&lt;strong&gt;output_path&lt;/strong&gt;: the S3 location where the trained model will be saved.&lt;br&gt;
&lt;strong&gt;get_execution_role()&lt;/strong&gt;: to ensure the SageMaker job has permissions to access AWS services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tune the model for best results by specifying hyperparameters such as:&lt;br&gt;
&lt;strong&gt;objective&lt;/strong&gt;: set to regression.&lt;br&gt;
&lt;strong&gt;eta&lt;/strong&gt;: learning rate.&lt;br&gt;
&lt;strong&gt;max_depth&lt;/strong&gt;: controls how deep the decision trees can grow.&lt;br&gt;
&lt;strong&gt;subsample&lt;/strong&gt;: percentage of data used per tree.&lt;br&gt;
These hyperparameters help control &lt;strong&gt;overfitting&lt;/strong&gt; and &lt;strong&gt;underfitting&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2F5vbgg3328pmo3mqzdewq.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%2F5vbgg3328pmo3mqzdewq.png" alt=" " width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;e) 👉 Train a model using Scikit-Learn Random Forest *&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_squared_error

# Train model
rf_model = RandomForestRegressor(n_estimators=100, random_state=42)
rf_model.fit(X_train, y_train.values.ravel())

# Evaluate
predictions = rf_model.predict(X_test)
mse = mean_squared_error(y_test, predictions)

print(f"Mean Squared Error: {mse}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Run a local model using &lt;strong&gt;Scikit-learn’s Random Forest&lt;/strong&gt; algorithm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use this local model to benchmark performance against the &lt;strong&gt;XGBoost&lt;/strong&gt; model trained on SageMaker.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;mean_squared_error&lt;/strong&gt; to compare and evaluate model &lt;strong&gt;accuracy&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fqodot35j9fbbu9vweibx.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%2Fqodot35j9fbbu9vweibx.png" alt=" " width="800" height="256"&gt;&lt;/a&gt;&lt;br&gt;
We can see mean_squared_error() gives accuracy value of 25% approx.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;f) 👉 Deploy the model and make predictions.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Deploy
xgb_predictor = xgb.deploy(initial_instance_count=1, instance_type='ml.t2.medium')

# Sample prediction
sample = X_test.iloc[0].values.tolist()
payload = ",".join(map(str, sample))

response = xgb_predictor.predict(payload, initial_args={'ContentType': 'text/csv'})

print(f"Predicted MedHouseVal: {float(response)}")
print(f"Actual MedHouseVal: {y_test.iloc[0].values[0]}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy&lt;/strong&gt; the trained model to a real-time &lt;strong&gt;HTTPS endpoint&lt;/strong&gt; in SageMaker.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This &lt;strong&gt;endpoint&lt;/strong&gt; allows sending requests to get &lt;strong&gt;predictions&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select one &lt;strong&gt;test row&lt;/strong&gt; and format it as a &lt;strong&gt;CSV&lt;/strong&gt; string (the format required by the endpoint).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Send a &lt;strong&gt;predict()&lt;/strong&gt; request to the deployed model endpoint using the formatted test data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compare the model’s &lt;strong&gt;prediction&lt;/strong&gt; with the &lt;strong&gt;actual value&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2F7ki000vnn9sd5oyg0qkr.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%2F7ki000vnn9sd5oyg0qkr.png" alt=" " width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;g) 👉 Clean-Up the resource&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Always &lt;strong&gt;delete SageMaker endpoints&lt;/strong&gt; when you’re done using them to avoid ongoing charges.&lt;/p&gt;

&lt;p&gt;Deleting the endpoint de-provisions the hosting instance and stops billing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xgb_predictor.delete_endpoint()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fyjdasy9yeoryhk2pmppd.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%2Fyjdasy9yeoryhk2pmppd.png" alt=" " width="800" height="56"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;h) 👉 Check data in S3 Bucket&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your &lt;strong&gt;S3 bucket&lt;/strong&gt;, and inside the &lt;strong&gt;objects&lt;/strong&gt;, you will find a folder named &lt;strong&gt;california-housing/&lt;/strong&gt;. Click on it.&lt;/li&gt;
&lt;/ol&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%2Fdrxt2gumurh0gghi3cr1.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%2Fdrxt2gumurh0gghi3cr1.png" alt=" " width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, click on the &lt;strong&gt;output&lt;/strong&gt; folder, then select &lt;strong&gt;sagemaker-xgboost&lt;/strong&gt;, and again click on the &lt;strong&gt;output&lt;/strong&gt; folder inside it.&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%2Ffd2geqhbjqja93jen2tw.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%2Ffd2geqhbjqja93jen2tw.png" alt=" " width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;There, you will see the &lt;strong&gt;model.tar.gz&lt;/strong&gt; file.&lt;/li&gt;
&lt;/ol&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%2F5owqwg6mzwtav450ycll.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%2F5owqwg6mzwtav450ycll.png" alt=" " width="800" height="310"&gt;&lt;/a&gt;&lt;br&gt;
This file contains the code we used in &lt;strong&gt;JupyterLab&lt;/strong&gt; to train the models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
● We created Amazon Sagemaker notebook instance.&lt;br&gt;
● We successfully configured conda_python3&lt;br&gt;
● We then created the dataset and uploaded it to S3 bucket.&lt;br&gt;
● We successfully trained the Built-in XGBoost&lt;br&gt;
● We successfully trained the Scikit-Learn Random Forest &lt;br&gt;
● We successfully Deployed XGBoost Model &amp;amp; used it for prediction.&lt;br&gt;
Finally, we cleaned-up the service in order to avoid incurring extra cost.&lt;/p&gt;

&lt;p&gt;Hope you found this post informative,&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Sumbul.&lt;/p&gt;

</description>
      <category>sagemaker</category>
      <category>machinelearning</category>
      <category>endtoendml</category>
      <category>designprinciples</category>
    </item>
    <item>
      <title>Neural Networks &amp; Generative Models</title>
      <dc:creator>Sumbul Naqvi</dc:creator>
      <pubDate>Thu, 18 Sep 2025 19:47:05 +0000</pubDate>
      <link>https://forem.com/sumbul_naqvi/neural-networks-generative-models-1mj1</link>
      <guid>https://forem.com/sumbul_naqvi/neural-networks-generative-models-1mj1</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%2Fbl6vc7v2zy4dafjylzz7.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%2Fbl6vc7v2zy4dafjylzz7.png" alt=" " width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this blog we will be talking about the basics of neural networks and generative models, which are fundamental concepts in the field of artificial intelligence and machine learning.&lt;/p&gt;

&lt;p&gt;I have created a &lt;a href="https://youtu.be/aV481dMmerg?feature=shared" rel="noopener noreferrer"&gt;YouTube video&lt;/a&gt; on similar lines before, would request you to go through it to start with: &lt;/p&gt;

&lt;p&gt;Before I move ahead, as a one liner if we define these terms it will read like:&lt;/p&gt;

&lt;p&gt;💡&lt;strong&gt;Artificial Intelligence (AI)&lt;/strong&gt;: It's the simulation of human intelligence in machines that are programmed to think and act like humans.&lt;/p&gt;

&lt;p&gt;💡&lt;strong&gt;Machine Learning (ML)&lt;/strong&gt;: It's a subset of artificial intelligence, which is broadly defined as the capability of a machine to imitate intelligent human behavior.&lt;/p&gt;

&lt;p&gt;💡&lt;strong&gt;Deep Learning (DL)&lt;/strong&gt;: It's a subset of machine learning that uses multilayered neural networks, called deep neural networks, to simulate the complex decision-making power of the human brain.&lt;/p&gt;

&lt;p&gt;💡&lt;strong&gt;Neural Networks:&lt;/strong&gt; It's a method in artificial intelligence that teaches computers to process data in a way that is inspired by the human brain.&lt;/p&gt;

&lt;p&gt;💡&lt;strong&gt;Generative Models:&lt;/strong&gt; These models focus on understanding how the data is generated. They aim to learn the distribution of the data itself. For instance, if we're looking at pictures of boy and girl, a generative model would try to understand what makes a boy look like a boy and a girl look like a girl.&lt;/p&gt;

&lt;p&gt;💡&lt;strong&gt;Generative adversarial network (GAN):&lt;/strong&gt; a deep learning architecture that trains two neural networks to compete against each other to generate more authentic new data from a given training dataset. A GAN is called adversarial because it trains two different networks and pits them against each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Artificial Neural Networks (ANN)&lt;/strong&gt; are the very core of Deep learning. They are versatile, powerful, scalable and ideal to tackle large and highly complex ML tasks.&lt;br&gt;
Applications of ANNs includes google images, powering speech recognition services (&lt;strong&gt;like Apple's Siri&lt;/strong&gt;), recommending the best video to watch to millions of users per day (&lt;strong&gt;YouTube&lt;/strong&gt;), learning to beat the world champion at the game of &lt;strong&gt;GO&lt;/strong&gt; (by examining millions of past games and the playing against itself e.g.: &lt;strong&gt;Deep Mind's AlphaGo&lt;/strong&gt;).&lt;br&gt;
Artificial neural networks were first introduced in 1943 when &lt;strong&gt;Warren McCulloch&lt;/strong&gt;, a neurophysiologist and a young mathematician, &lt;strong&gt;Walter Pitts&lt;/strong&gt;, developed the first models of neural networks.&lt;/p&gt;

&lt;p&gt;They presented a model of &lt;strong&gt;How biological neurons might work together in animal brains to perform complex computations&lt;/strong&gt;. This was &lt;strong&gt;1st ANN Architecture&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;ANN&lt;/strong&gt; entered dark era due to lack of resources. Later in 1980 there was a revival of interests in ANN as network architectures were invented and better training techniques were developed.&lt;br&gt;
But by 1990's powerful alternative ML techniques such as &lt;strong&gt;SVM&lt;/strong&gt; (Support Vector Machine) were favoured by most researchers, as they seemed to offer better results and stronger theoretical foundations.&lt;/p&gt;

&lt;p&gt;Now the question arises &lt;strong&gt;Why are ANNs relevant today?&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%2Ff2ki4dplq3btdxi8zxly.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%2Ff2ki4dplq3btdxi8zxly.png" alt=" " width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The answer to it is:&lt;br&gt;
✔️ Firstly, huge quantity of data is available to train neural network. &lt;br&gt;
✔️ Secondly, improved hardware and software resources in terms of more powerful GPUs etc. With tremendous increase in computing power has made it possible to train large neural networks in a reasonable amount of time.&lt;br&gt;
✔️ Thirdly, ANNs frequently outperform other ML techniques on very large and complex problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Warren McCulloch&lt;/strong&gt; and &lt;strong&gt;Walter Pitts&lt;/strong&gt; model of biological neuron
&lt;/h2&gt;

&lt;p&gt;The first computational model of a neuron was proposed by Warren McCulloch (neuroscientist) and Walter Pitts (logician) in 1943. It may be divided into 2 parts. The first part, g takes an input, performs an aggregation and based on the aggregated value the second part, f makes a decision.&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%2F7yjo39ktuhq7398cdx2m.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%2F7yjo39ktuhq7398cdx2m.png" alt=" " width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The artificial neurons activate its output when more than a certain number of its input are active. &lt;br&gt;
In a simple neural network, every node in one layer is connected to every node in the next layer. There is only a &lt;strong&gt;single hidden layer&lt;/strong&gt;.&lt;br&gt;
Whereas Deep learning systems have &lt;strong&gt;several hidden layers&lt;/strong&gt; that make them deep😊&lt;/p&gt;

&lt;p&gt;There are two main types of deep learning systems with differing architectures - convolutional neural networks (&lt;strong&gt;CNNs&lt;/strong&gt;) and recurrent neural networks (&lt;strong&gt;RNNs&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;The main differences between CNNs and RNNs include the following: &lt;br&gt;
✔️&lt;strong&gt;CNNs&lt;/strong&gt; are commonly used to solve problems involving spatial data, such as images. &lt;br&gt;
✔️&lt;strong&gt;RNNs&lt;/strong&gt; are better suited to analyzing temporal and sequential data, such as text or videos. It good at natural language functions like language modeling, speech recognition, and sentiment analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CNNs and RNNs have different architectures.&lt;/strong&gt;&lt;br&gt;
Convolutional neural networks (&lt;strong&gt;CNN&lt;/strong&gt;) are one of the most popular models used today. This neural network computational model uses a variation of multilayer perceptrons and contains one or more convolutional layers that can be either entirely connected or pooled. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RNN&lt;/strong&gt; use other data points in a sequence to make better predictions. They do this by taking in input and reusing the activations of previous nodes or later nodes in the sequence to influence the output.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Perceptron?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It is one of the &lt;strong&gt;smallest ANN&lt;/strong&gt; architectures invented in 1957 by &lt;strong&gt;Frank Rosenblatt&lt;/strong&gt;, based on a slightly different artificial neuron called a Linear Threshold Unit (&lt;strong&gt;LTU&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%2Fes9st5n63wuhay4qld40.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%2Fes9st5n63wuhay4qld40.png" alt=" " width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;LTU&lt;/strong&gt;, the inputs and outputs are now numbers, instead of binary on/off values.&lt;br&gt;
Each input connection is associated with a weight.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;It computes a weighted sum of its input&lt;/em&gt;&lt;/strong&gt;. Then applies &lt;strong&gt;&lt;em&gt;step function to that sum&lt;/em&gt;&lt;/strong&gt; and gives output.&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%2Fv6wx2a3v77gjz8r3usth.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%2Fv6wx2a3v77gjz8r3usth.png" alt=" " width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A simple LTU can be used for simple linear binary classification. It computes a linear combination of the inputs and if the results exceeds a threshold, it outputs a positive class or else outputs negative class. Just live our logistic regression classifier or linear SVM models of ML.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;2010 Xavier Glorot, Yoshua Bengio&lt;/strong&gt; published a paper titled "&lt;strong&gt;&lt;em&gt;Understanding the difficulty of training deep feedforward neural networks&lt;/em&gt;&lt;/strong&gt;" in International Conference. They suggested that root cause of &lt;strong&gt;Vanishing Gradient problem&lt;/strong&gt; (since gradient becomes really small in early input layers which lead to slow training) in Neural Network, can be solved by using better &lt;strong&gt;activation functions&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%2Fgksb8dznqbqm22zt749u.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%2Fgksb8dznqbqm22zt749u.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a neural network, we update the &lt;strong&gt;weights&lt;/strong&gt; and &lt;strong&gt;biases&lt;/strong&gt; of the neurons on the basis of the error at the output. This process is known as &lt;strong&gt;back-propagation&lt;/strong&gt;. &lt;br&gt;
Activation functions make the back-propagation possible since the &lt;strong&gt;gradients&lt;/strong&gt; are supplied along with the &lt;strong&gt;error&lt;/strong&gt; to update the &lt;strong&gt;weights&lt;/strong&gt; and &lt;strong&gt;biases&lt;/strong&gt;.&lt;br&gt;
Thus we can say that a neural network is just a BIG mathematical function. You could use different activation functions for different neurons in the same/different layer(s). Different activation functions allow for different non-linearities which might work better for solving a specific function.&lt;br&gt;
Before we end this blog and leave further learning for next post. &lt;/p&gt;

&lt;p&gt;Let's talk about:&lt;/p&gt;

&lt;h2&gt;
  
  
  How can AWS help with your deep learning requirements?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon Web Services (AWS)&lt;/strong&gt; has several &lt;strong&gt;Deep Learning&lt;/strong&gt; offerings. Some examples of &lt;strong&gt;AWS&lt;/strong&gt; services you can use to fully manage specific deep learning applications include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Augmented AI (Amazon A2I)&lt;/strong&gt; enables you to build the workflows required for human review of ML predictions. &lt;strong&gt;Amazon A2I&lt;/strong&gt; brings human review to all developers, removing the undifferentiated heavy lifting associated with building human review systems or managing large numbers of human reviewers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon CodeGuru Security&lt;/strong&gt; tracks, detects, and fixes code security vulnerabilities across the entire development cycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Comprehend&lt;/strong&gt; uses natural language processing (&lt;strong&gt;NLP&lt;/strong&gt;) to extract insights about the content of documents. It develops insights by recognizing the entities, key phrases, language, sentiments, and other common elements in a document.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon DevOps Guru&lt;/strong&gt; makes it easy for developers and operators to improve the performance and availability of their applications, improves application availability using ML-powered cloud operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Forecast&lt;/strong&gt; is deep learning service for time-series forecasting, uses ML to forecast sales operations and inventory needs for millions of items.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Fraud Detector&lt;/strong&gt; detects online fraud with ML, enhancing business security practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Translate&lt;/strong&gt; powered by deep-learning technologies, Amazon Translate delivers fast, high-quality, and affordable language translation. It provides highly accurate and continually improving translations with a single API call.&lt;/p&gt;

&lt;p&gt;Hope you enjoyed going through this article.&lt;br&gt;
Thanks&lt;br&gt;
Sumbul&lt;/p&gt;

</description>
      <category>ai</category>
      <category>neuralnetwork</category>
      <category>generativemodels</category>
      <category>deeplearning</category>
    </item>
  </channel>
</rss>
