<?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: Evil Commissar</title>
    <description>The latest articles on Forem by Evil Commissar (@abandonedsign).</description>
    <link>https://forem.com/abandonedsign</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%2F724%2FF-5yJzAZ.jpg</url>
      <title>Forem: Evil Commissar</title>
      <link>https://forem.com/abandonedsign</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abandonedsign"/>
    <language>en</language>
    <item>
      <title>Watchout! Laravel Vapor!</title>
      <dc:creator>Evil Commissar</dc:creator>
      <pubDate>Sat, 04 Jul 2020 15:12:30 +0000</pubDate>
      <link>https://forem.com/abandonedsign/watchout-laravel-vapor-45ep</link>
      <guid>https://forem.com/abandonedsign/watchout-laravel-vapor-45ep</guid>
      <description>&lt;p&gt;Hi there 👋&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR: The goal of this post is not to blame. I'd like to share my view and experience after a few months of using Laravel Vapor. Maybe, my monolog will be processed by the Laravel team and some of my "pain points" could be converted to backlog items. Also, at the end of this post, I'll share some good learning resources.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Foreword
&lt;/h3&gt;

&lt;p&gt;I assume that the reader of this post has at least general knowledge about aws/serverless/laravel/vapor. This is not an introduction to a serverless world either laravel. Just in case, you can read a great &lt;a href="https://dev.to/themsaid/what-is-aws-lambda-and-how-laravel-vapor-uses-it-1j98"&gt;overview of aws lambda&lt;/a&gt; by Mohamed Said if you're interested in such content.&lt;/p&gt;

&lt;h3&gt;
  
  
  Motivation
&lt;/h3&gt;

&lt;p&gt;Today in the morning I've received a push notification from my mobile bank app. AWS just charged my account by 50$. It's a really huge price only in one case - empty account. I knew that currently - I'm not using any of the services. Surprise!&lt;br&gt;
That's why this post should be here. Maybe, it will help someone better understand the tools they are using.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Types
&lt;/h3&gt;

&lt;p&gt;I would say that not all projects are suitable for serverless. Deal with it. There is no need to prove that you can host your e-shop using Lambda! Yes, you can of course, but instead of benefits, you'll get bottlenecks in different places.&lt;/p&gt;

&lt;p&gt;Mostly because of limits. Always keep in mind &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html"&gt;Lamda's limitation&lt;/a&gt; before going serverless!&lt;/p&gt;

&lt;p&gt;The most important things that need to be considered in the case of migration classical app to serverless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File Uploads. (Yes, all existing uploads should be rewritten via &lt;a href="https://docs.vapor.build/1.0/resources/storage.html#file-uploads"&gt;different approach&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Headers size. That's very strange but for some reason, headers have limited size than can be easily reached. For example, if you prefer storing JWT token in cookies and transfer it via HTTP - you might not guess the final size and make your site unavailable for visitors. Just by setting cookies.&lt;/li&gt;
&lt;li&gt;Background jobs. They are different a bit. Again, because of limits. I saw folks usually go for 5$ droplet on the digital ocean for horizon/laravel/jobs worker setup.&lt;/li&gt;
&lt;li&gt;You need skilled developers. Things can go wrong very easily. Something can be configured wrong and you will spend a lot of money because of the serverless charging model.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Price
&lt;/h3&gt;

&lt;p&gt;I wish Laravel Vapor will be closer to the developers. Like the digital ocean does. Yes, of course, for mid/big size teams it's a fair price. But for standalone developers, it is too much.&lt;/p&gt;

&lt;p&gt;I understand the reasons. But cannot understand why there is no 10$ "hack" plan for those who don't need support and who can live even with 1-2 deployments per day.&lt;/p&gt;

&lt;p&gt;I think this will definitely popularize serverless among developers. And Vapor will grow in popularity too. But we have what we have.&lt;/p&gt;

&lt;h3&gt;
  
  
  So, what about 50$?
&lt;/h3&gt;

&lt;p&gt;Laravel Vapor doesn't care about the resources that he created.&lt;br&gt;
And in my opinion, there are should be multiple notices about this (at least somewhere during registration or on the dashboard or when you deleting stuff).&lt;/p&gt;

&lt;p&gt;There is no way to monitor the state properly (something like Terraform does). After changing some settings on AWS - that settings will not be reflected on your Vapor account and vice versa. That is a big disadvantage. In my case, the root cause was simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I've canceled my Vapor subscription.&lt;/li&gt;
&lt;li&gt;Disabled and removed everything from Vapor (even access to AWS account).&lt;/li&gt;
&lt;li&gt;Thought I'm done with my playground projects and can easily close the browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I was wrong. All CloudWatch events were in the AWS account as well as lambda functions and other stuff that Vapor created for project needs.&lt;/p&gt;

&lt;p&gt;And because on of my different project removed bucket where was &lt;code&gt;vendor&lt;/code&gt; folder with all project dependencies - functions got these errors in an infinite loop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U64OyYwy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0qdm8k7vnz1obn1ykr18.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U64OyYwy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0qdm8k7vnz1obn1ykr18.png" alt="error log"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, I paid my invoice for error invocations because of that :D&lt;/p&gt;

&lt;h3&gt;
  
  
  Final words
&lt;/h3&gt;

&lt;p&gt;Will something change with the Laravel Vapor pricing model in the near future? No. Simple developers aren't a focus group. No one cares about them, because there will be always teams who can easily pay 39$ per month. And that's normal and understandable.&lt;/p&gt;

&lt;p&gt;Last but not least - Thank you guys from the Laravel team!&lt;br&gt;
I have fun during my 3-month journey with laravel Vapor &amp;amp; serverless in general. UI/UX very simple and intuitive.&lt;br&gt;
Support also is very nice, polite, and responsible.&lt;/p&gt;

&lt;p&gt;I wish luck with this great product. &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=xqVUdebctAM"&gt;Laravel Vapor Overview&lt;/a&gt; - a great youtube overview video by Andre Madarang.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.vapor.build/1.0/introduction.html"&gt;Official Laravel Vapor Docs&lt;/a&gt; - read it even before going serverless. You'll learn a lot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://serverlesslaravelcourse.com/"&gt;Serverless Laravel&lt;/a&gt; - a paid course by Jack Ellis. Highly recommend this, especially if you are new in serverless world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dynamodbbook.com/"&gt;DynamoDB Book&lt;/a&gt; - fantastic lake of knowledge. It's more for advanced users but still worth mention.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>vapor</category>
      <category>serverless</category>
      <category>aws</category>
    </item>
    <item>
      <title>Hi, I'm Evil Commissar</title>
      <dc:creator>Evil Commissar</dc:creator>
      <pubDate>Tue, 13 Dec 2016 15:58:57 +0000</pubDate>
      <link>https://forem.com/abandonedsign/hi-im-evil-commissar</link>
      <guid>https://forem.com/abandonedsign/hi-im-evil-commissar</guid>
      <description>&lt;p&gt;I have been coding for [number] years.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter as &lt;a href="https://twitter.com/abandoned_sign" rel="noopener noreferrer"&gt;@abandoned_sign&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I live in [city].&lt;/p&gt;

&lt;p&gt;I work for [company]&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: [languages].&lt;/p&gt;

&lt;p&gt;I am currently learning more about [topic].&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
