<?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: Rajan</title>
    <description>The latest articles on DEV Community by Rajan (@rgrajan).</description>
    <link>https://dev.to/rgrajan</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%2F500239%2F579c222a-a5b8-4f4d-958e-20dd30785988.png</url>
      <title>DEV Community: Rajan</title>
      <link>https://dev.to/rgrajan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rgrajan"/>
    <language>en</language>
    <item>
      <title>Architect for Speed</title>
      <dc:creator>Rajan</dc:creator>
      <pubDate>Sat, 30 Jan 2021 18:21:55 +0000</pubDate>
      <link>https://dev.to/aws-builders/architect-for-speed-2m35</link>
      <guid>https://dev.to/aws-builders/architect-for-speed-2m35</guid>
      <description>&lt;p&gt;In my previous company, I met the CEO on one late evening during his regular trip from USA to India in a compact conference room. I proposed an idea of creating the SaaS product when we had the large enterprise platform. I said, you all (founders) have vast experience in the domain. So, we should create a simple product based on our total experience instead of creating a highly configurable platform.&lt;/p&gt;

&lt;p&gt;My idea got approved once he returned to the US, and they allowed me to start. I got another dedicated engineer to the team soon. We created pilot including product architecture framework, new database design with search powered by Lucene. The multi-tenanted basic product was ready for demo in 4 months and it was March 2009… Later, this product replaced Rail GDS in one of our clients is an unfamiliar story.&lt;/p&gt;

&lt;p&gt;A decade later, let’s go through few scenarios.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 1
&lt;/h3&gt;

&lt;p&gt;A client describes the requirement, &lt;em&gt;“I am receiving so many order requests in email, it’s structured format, can we automate it by integrating with internal order systems?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The solution proposal by the consultant is &lt;em&gt;“Let’s bring Databricks, NLPs of the world, Knowledge Graph and Deep Learning for the forecast of the emails.” etc.,&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 2
&lt;/h3&gt;

&lt;p&gt;Another client &lt;em&gt;“I have people manually attaching the emails to order processing system for references, is it possible to automate?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The solution proposal by the consultant is &lt;em&gt;“Let’s use RPA as the client already using that and optimize the work.”&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 3
&lt;/h3&gt;

&lt;p&gt;Another client &lt;em&gt;“I have leads coming through an email, can we automate it by integrating with internal Lead Management System?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The solution proposal is &lt;em&gt;“Let’s start with integrating AWS SES with email and use Lambda to parse the email and integrate with Lead system.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The 3rd scenario launched to market in less than a month with all the DevOps pipelines. The 2nd scenario is less than two months and I will leave it to your guess about the Scenario 1. &lt;br&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Cut, Copy &amp;amp; Paste” was first introduced in iOS3 and iPhone is one among the most innovate products of 21st Century &lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I know that we are all thinking “How to create value through technology?”. That doesn’t mean that a specific problem needs over-engineering. E.g.: Creating complex domain models which will support futuristic products for a real estate business. Recommending customer 360/MDM for property buyers/sellers. How many properties will anyone buy/sell in their lifetime? Even if they are return customer, their interests might vary for the large time span.&lt;/p&gt;

&lt;p&gt;Don’t see business problem through the technology lens. Whatever you are implementing now will become legacy in next 5 years. Perceive, Simplify &amp;amp; Execute faster.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The client conversations are fictional, inspired and not related to my current work. This is originally published at &lt;a href="https://www.linkedin.com/pulse/architect-speed-rajan-r-g"&gt;linkedin&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>speed</category>
    </item>
    <item>
      <title>S3 redirect to another domain and preserving Query String</title>
      <dc:creator>Rajan</dc:creator>
      <pubDate>Sun, 15 Nov 2020 20:00:21 +0000</pubDate>
      <link>https://dev.to/aws-builders/s3-redirect-to-another-domain-and-preserving-query-string-371n</link>
      <guid>https://dev.to/aws-builders/s3-redirect-to-another-domain-and-preserving-query-string-371n</guid>
      <description>&lt;p&gt;One of our clients has Microsites transferred to independent domains. The Microsite URL is like &lt;a href="http://www.rewards.com/loyalty1"&gt;www.rewards.com/loyalty1&lt;/a&gt; and it’s moved to &lt;a href="http://www.loyalty1.com"&gt;www.loyalty1.com&lt;/a&gt;. The hosting of both the sites are in AWS S3 with Cloudfront. &lt;/p&gt;

&lt;p&gt;This is permanent change, and we all know that it should be 301 permanent redirect. As you see in this &lt;a href="https://dev.to/imewish/url-redirects-with-aws-s3-and-cloudfront-96a"&gt;post&lt;/a&gt;, we have to update the Redirect rules in S3. The client has configured the rules, but they have old campaigns with UTM values referring to the earlier domain. As per S3 redirect rules, the sites are redirecting to new domain, but it does not preserve the query strings. &lt;/p&gt;

&lt;p&gt;I have noticed two issues, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When I checked through browser developer tools, two round-trips happening. First, &lt;a href="https://www.rewards.com/loyalty1?utm_source=fall2020"&gt;https://www.rewards.com/loyalty1?utm_source=fall2020&lt;/a&gt; to &lt;a href="http://www.loyalty1.com"&gt;http://www.loyalty1.com&lt;/a&gt; and then redirects to &lt;a href="https://www.loyalty1.com"&gt;https://www.loyalty1.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;UTM values in the query strings are missing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Referring the AWS &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html"&gt;documentation&lt;/a&gt;, noticed an element we can add to the rules. &lt;code&gt;Protocol&lt;/code&gt;, this can be &lt;code&gt;http&lt;/code&gt;, &lt;code&gt;https&lt;/code&gt; or &lt;code&gt;none&lt;/code&gt;. This will force the redirects to the protocol configured. This element is missing in the rules, so one other round-trip.&lt;/p&gt;

&lt;p&gt;The issue of losing the campaign query strings during the redirect is because of the element &lt;code&gt;ReplaceKeyWith&lt;/code&gt;. There is an excellent discussion at &lt;a href="https://stackoverflow.com/questions/30775068/amazon-s3-redirect-rule-preserve-query-params"&gt;stackoverflow&lt;/a&gt;. So use &lt;code&gt;ReplaceKeyPrefixWith&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Finally, following is the rule we configured,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    {
        "Condition": {
            "KeyPrefixEquals": "loyalty1"
        },
        "Redirect": {
            "HostName": "loyalty1.com",
            "HttpRedirectCode": "301",
            "Protocol": "https",
            "ReplaceKeyPrefixWith": ""
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is redirecting to the new domain, but still there is one issue. The condition check is case sensitive. I don’t see any regex references in the documentation for redirect rules. Anyone has an alternate solution for this?&lt;/p&gt;

</description>
      <category>aws</category>
      <category>s3</category>
    </item>
  </channel>
</rss>
