<?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: Vilsi Jain</title>
    <description>The latest articles on DEV Community by Vilsi Jain (@vilsijain).</description>
    <link>https://dev.to/vilsijain</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%2F529274%2Fefcbe7c2-7f3e-444c-b324-378452c2adc8.jpg</url>
      <title>DEV Community: Vilsi Jain</title>
      <link>https://dev.to/vilsijain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vilsijain"/>
    <language>en</language>
    <item>
      <title>Deploying a Flask Model on AWS: A Step-by-Step Guide</title>
      <dc:creator>Vilsi Jain</dc:creator>
      <pubDate>Sat, 03 Jun 2023 09:23:33 +0000</pubDate>
      <link>https://dev.to/vilsijain/deploying-a-flask-model-on-aws-a-step-by-step-guide-d8a</link>
      <guid>https://dev.to/vilsijain/deploying-a-flask-model-on-aws-a-step-by-step-guide-d8a</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br&gt;
In this I will be sharing how you can deploying machine learning models to your data-driven applications into scalable and production-ready solutions. In this will walk through the process of deploying a Flask model on AWS (Amazon Web Services), one of the most popular cloud platforms. By following these step-by-step instructions, you'll be able to leverage the power of AWS to make your Flask application accessible to users worldwide.&lt;/p&gt;

&lt;p&gt;I have to deploy my machine learning model which converted into flask project to deploy and get API faced issues finding proper documentation So tried to get proper guidance with steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;li&gt;Setting AWS Account&lt;/li&gt;
&lt;li&gt;Creating an EC2 Instance&lt;/li&gt;
&lt;li&gt;Configuring the EC2 Instance&lt;/li&gt;
&lt;li&gt;Installing Dependencies&lt;/li&gt;
&lt;li&gt;Building the Flask Application&lt;/li&gt;
&lt;li&gt;Deploying the Flask Model&lt;/li&gt;
&lt;li&gt;Testing and Deployed Application&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1: Prerequisites&lt;/strong&gt;&lt;br&gt;
Make sure the following conditions are met before beginning the deployment process:&lt;/p&gt;

&lt;p&gt;Basic understanding of Flask and AWS concepts&lt;br&gt;
An AWS account with appropriate permissions to create and configure resources&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2: Setting up an AWS Account&lt;/strong&gt;&lt;br&gt;
If you don't have an AWS account, visit the website and sign up for a new one. Follow the provided instructions to complete the registration process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3: Creating an EC2 Instance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the AWS Management Console and log in.&lt;br&gt;
Using the EC2 service, go there and select "Launch Instance."&lt;br&gt;
Choose a suitable Amazon Machine Image (AMI) for your needs.&lt;br&gt;
Based on the requirements of your application, select an instance type.&lt;br&gt;
Set up the instance's specifics, such as how many instances there are, the network configuration, and storage.&lt;br&gt;
Set security groups established to accept incoming traffic.&lt;br&gt;
Review and launch the instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4: Configuring the EC2 Instance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the instance is launched, connect to it using SSH.&lt;br&gt;
Install necessary packages and dependencies on the EC2 instance.&lt;br&gt;
Set up your environment variables and configurations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5: Installing Dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install the required dependencies such as Flask, scikit-learn, etc.&lt;br&gt;
Set up a virtual environment for isolating dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6: Building the Flask Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a Flask application.&lt;br&gt;
Define routes and implement the necessary logic for your machine learning model.&lt;br&gt;
Test the application locally to ensure it's functioning correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7: Deploying the Flask Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Copy your Flask application files to the EC2 instance.&lt;br&gt;
Install the WSGI server (e.g., Gunicorn) to run the Flask application.&lt;br&gt;
Configure the web server and application for production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8: Testing the Deployed Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Access the public IP or domain name associated with your EC2 instance.&lt;br&gt;
Verify that the Flask application is up and running.&lt;br&gt;
Test the endpoints and functionality to ensure they are working as expected.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Congratulations! You have successfully deployed your Flask model on AWS. By leveraging the power of AWS, you can now provide your machine learning application to users worldwide. Remember to monitor and maintain your application regularly to ensure its optimal performance and scalability.&lt;/p&gt;

&lt;p&gt;In this tutorial, we have covered the essential steps to deploy a Flask model on AWS. However, keep in mind that this is just the beginning. As we go deeper into the world of cloud deployment, there are additional considerations such as load balancing, autoscaling, and security that you may need to explore based on your specific use case.&lt;/p&gt;

&lt;p&gt;Deploying machine learning models on the cloud opens up endless possibilities for scaling and delivering your applications to a wider audience. Keep learning, experimenting, and leveraging the vast resources available to continuously enhance your deployment skills.&lt;/p&gt;

&lt;p&gt;Follow - Vilsi jain&lt;br&gt;
Linkedin - &lt;a href="https://www.linkedin.com/in/vilsijain08/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/vilsijain08/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>machinelearning</category>
      <category>api</category>
      <category>python</category>
    </item>
    <item>
      <title>AWS API Gateway with Terraform</title>
      <dc:creator>Vilsi Jain</dc:creator>
      <pubDate>Thu, 20 Jan 2022 11:49:57 +0000</pubDate>
      <link>https://dev.to/vilsijain/integrate-aws-with-web-4ob5</link>
      <guid>https://dev.to/vilsijain/integrate-aws-with-web-4ob5</guid>
      <description>&lt;p&gt;__Most of the projects start as a monolith and then, in time, comes the part where we start splitting it in the “microservices” we all love. With this change in architecture there will be a part of your code that will start to look like a router, where it receives some request from the outside world and proceeds to redirect it to whoever is responsible for answering it. The AWS API Gateway is here so, we can lift those concerns from your service. We can even add more cross-cutting concerns to it (like authentication or rate limiting). Having this approach will even help with the latency of your response as it will skip the step of interpreting code to know were it should go, because it’s doing it directly in the AWS API Gateway.&lt;br&gt;
Enough chit-chat and let’s get some coding done, starting with the creation of the api entry:&lt;br&gt;
&lt;code&gt;resource “aws_api_gateway_rest_api” “api” {&lt;br&gt;
 name = “api-gateway”&lt;br&gt;
 description = “Proxy to handle requests to our API”&lt;/code&gt;&lt;br&gt;
}&lt;br&gt;
In here we are creating the REST API resource to where all the requests are going to hit. Next we will start to configure what we want this API to do:&lt;br&gt;
`resource "aws_api_gateway_resource" "resource" {&lt;br&gt;
  rest_api_id = "${aws_api_gateway_rest_api.api.id}"&lt;br&gt;
  parent_id   = "${aws_api_gateway_rest_api.api.root_resource_id}"&lt;br&gt;
  path_part   = "{proxy+}"&lt;br&gt;
}&lt;br&gt;
resource "aws_api_gateway_method" "method" {&lt;br&gt;
  rest_api_id   = "${aws_api_gateway_rest_api.api.id}"&lt;br&gt;
  resource_id   = "${aws_api_gateway_resource.resource.id}"&lt;br&gt;
  http_method   = "ANY"&lt;br&gt;
  authorization = "NONE"&lt;br&gt;
  request_parameters = {&lt;br&gt;
    "method.request.path.proxy" = true&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
resource "aws_api_gateway_integration" "integration" {&lt;br&gt;
  rest_api_id = "${aws_api_gateway_rest_api.api.id}"&lt;br&gt;
  resource_id = "${aws_api_gateway_resource.resource.id}"&lt;br&gt;
  http_method = "${aws_api_gateway_method.method.http_method}"&lt;br&gt;
  integration_http_method = "ANY"&lt;br&gt;
  type                    = "HTTP_PROXY"&lt;br&gt;
  uri                     = "&lt;a href="http://your.domain.com/%7Bproxy%7D" rel="noopener noreferrer"&gt;http://your.domain.com/{proxy}&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;request_parameters =  {&lt;br&gt;
    "integration.request.path.proxy" = "method.request.path.proxy"&lt;br&gt;
  }&lt;br&gt;
}`&lt;br&gt;
Let’s do this in small steps so it’s clearer what is happening here.&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%2Fghsk1g6uel9fn9hfholb.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%2Fghsk1g6uel9fn9hfholb.png" alt=" " width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource&lt;/strong&gt;&lt;br&gt;
This is where we’ll configure on what endpoint are we listening for requests. The path_part argument will contain a string that represents the endpoint path, as our case is a simple proxy, AWS provides a special handler to listen all the requests, the "{proxy+}". This handler can also be applied to a more specific path, i.e "users/{proxy+}" where it will listen to anything starting with users ( i.e users/1/posts , users/3/notes , etc). The other values presented in there are related to where will this resource be applied, the rest_api_id will have the id of what API we are mounting this resource and the parent_id has the id of the parent on where are mounting this. This last one can be mounted directly on the root api (as we have) or mounted in another resource making it a child resource that will be composed by both parent and child. So if you have the path_part defined as "active" in the child resource and it’s mounted in the users resource, the child resource will listen to a users/active endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Method&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the method resource is were we build the specification of the endpoint we are listening. The http_method argument will have the string with what HTTP method we’re interested, the "ANY" value is, again, a special handler where we’ll accept any HTTP method that comes our way. In the case we have in hands we won’t need any authorization done in our AWS API Gateway, and that’s why the value in authorization is "NONE" . The request_parameters argument, will state that we will have something in a proxy handler required for this method and that will passed to the integration resource (described next).This resource also has some arguments related to where it should be mounted, namely the rest_api_id that is the same as the one described in the Resource resource and the resource_id that represents to what resource it should be related to.&lt;br&gt;
&lt;strong&gt;Integration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The integration resource is related to how are we going to react to the request that we just received, it could go from passing the request to a backend, run some lambda function or even doing nothing with it. Besides the arguments previously referenced ( rest_api_id and resource_id ), we have the http_method argument that will be the same as the method resource (that’s why we link both of them with the "${aws_api_gateway_method.method.http_method}" ), the integration_http_method argument represents the HTTP method that will be done from the integration to our backend (again the "ANY" value is a special one) and we have the type argument where we configure what type of integration this is. As for the uri argument it will contain the endpoint to where we are proxying to, and the request_paramenters argument will map what we need from the method resource to our request to the backend, in our case we are are replacing the {proxy} handler present in the uri argument with the path that comes after the domain of our API Gateway.&lt;br&gt;
The way that all of this can be grouped together is that a method and a integration are wrapped around a resource, the method will be responsible on how can the API Gateway be reached and the integration will be responsible in interacting with the backend. Kinda like this:&lt;/p&gt;

&lt;p&gt;AWS API gateway working 🎉 If we go to&lt;br&gt;&lt;br&gt;
&lt;code&gt;https://api-gateway.execute-api.{region}.amazonaws.com&lt;/code&gt; (the {region} is the region where you’ll deploy the API, i.e eu-west-1) we’ll be communicating with our API Gateway. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Journey of Hackathon</title>
      <dc:creator>Vilsi Jain</dc:creator>
      <pubDate>Sun, 18 Apr 2021 08:58:26 +0000</pubDate>
      <link>https://dev.to/hackthisfall/journey-of-hackathon-1m1k</link>
      <guid>https://dev.to/hackthisfall/journey-of-hackathon-1m1k</guid>
      <description>&lt;p&gt;What is a hackathon?&lt;br&gt;
&lt;strong&gt;Hackathon&lt;/strong&gt; which makes ideas into real world problem solutions , which make you connect with like minded people it make you a good team leader , grow your skills and work with different partners.&lt;br&gt;
I started my journey of hackathon in 1st year itself without knowing much, just made my team and started that time I am not a winner. I am a learner and then till now I take part in an 8+ hackathon and now I am a mentor in a hackathon.&lt;br&gt;
Who can join — In mostly Hackathon is beginner friendly everyone can participate in that just you need to make a good team and develop technical skills or if you don’t have just give it and learn the working pattern.&lt;/p&gt;

&lt;p&gt;Getting Started:&lt;br&gt;
&lt;strong&gt;1)Find Your Hackathon&lt;/strong&gt; best fits on you From what I observed I found that the best profile of hackers are people who:&lt;br&gt;
They are highly competitive with a hunger to win&lt;br&gt;
bored by “just talking about it” and have the passion to see real results&lt;br&gt;
get energized by pressure deadlines&lt;br&gt;
fueled by finding like-minded people to idea to and work with&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. First Decided to make a team of technical and good leader.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;FORMING TEAM:&lt;br&gt;
Team chemistry and makeup is one of the most important factors not only in winning, but also in making sure that you don’t burn out. To ensure that you have a chance, here are some tips:&lt;br&gt;
Pitch your idea during the initial pitching session and get folks to buy-in on sharing your vision.&lt;br&gt;
Join a team that already has a front-end engineer. This is a key role that I’ll describe in further detail below.&lt;br&gt;
Have a team of friends or previous hackers to participate with. Knowing each member’s strengths and weaknesses beforehand gives you an advantage in preparation and execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Employ These Strategies to Be Part of the Best Team&lt;/strong&gt;-   Make good strategies and make everyone on your team give their points and if you have a good team you will always have a chance to make sure that you are in the right direction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Understanding the Judges Panel is Key How to work&lt;/strong&gt;- this is the best which help me to win understand the background of Judges what they want from you or in which field they are more proficient with this you will get idea that in which field you should focus more and pitch your idea.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Decide Your Approach your topic and according to your skills divide it&lt;/strong&gt;- Yes, always problem or field is given or open to all in that situation&lt;br&gt;&lt;br&gt;
1)team member should meet and discuss the innovative idea 2)approach how to make it skills required 3)Divide the work on the skills of person.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.It’s for good time Utilize it best Hackathons&lt;/strong&gt;-  typically last 24–48 hours, and the time will fly (especially if you want time for meals and sleep!).Get a general sense of who on your team will work on what, and approximately how long you expect it to take. Timebox tasks, noting when you will “just move on,” even if you can’t get things to work. Bugs can creep up anywhere — and a hackathon is no exception. Deciding in advance how much time you’ll allow for the different parts of your project, and when you’ll move on to a plan B, will help ensure that you have something to demo come pitch time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.Learn How to Effectively Validate Your Idea and present it&lt;/strong&gt;- presentation is main to win means putting your ideas in front of judges is most important and you&lt;br&gt;
It’s for good time Utilize it best Hackathons typically last 24–48 hours, and the time will fly (especially if you want time for meals and sleep!).Get a general sense of who on your team will work on what, and approximately how long you expect it to take. Time box tasks, noting when you will “just move on,” even if you can’t get things to work. Bugs can creep up anywhere — and a hackathon is no exception. Deciding in advance how much time you’ll allow for the different parts of your project, and when you’ll move on to a plan B, will help ensure that you have something to demo come pitch time.&lt;br&gt;
Learn How to Effectively Validate Your Idea and present it presentation is main to win means putting your ideas in front of judges is most important and you&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8.Always write your mistake which you done and work upon it&lt;/strong&gt;-&lt;/p&gt;

&lt;p&gt;This is the most important one “Learn from your mistake and try not to revise that in next”&lt;/p&gt;

&lt;p&gt;My best experience of winning Hackathon from Incubatedind (&lt;a href="https://www.incubateind.com/" rel="noopener noreferrer"&gt;https://www.incubateind.com/&lt;/a&gt; ) ,Code-n-build ,CIS, Github and my MLH Hackathons,Zeta Hacks3.0 other Hackathon experience is also cool as we always learn from that&lt;br&gt;
IncubatedInd make best experience of your Hackathon I think you once checkout.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
