<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by AnandRathi Wealth Tech on Medium]]></title>
        <description><![CDATA[Stories by AnandRathi Wealth Tech on Medium]]></description>
        <link>https://medium.com/@arwealthtech?source=rss-601ba2c34cfa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*oycA79BTiX_coYyQX9MWUw.png</url>
            <title>Stories by AnandRathi Wealth Tech on Medium</title>
            <link>https://medium.com/@arwealthtech?source=rss-601ba2c34cfa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:59:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arwealthtech/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Lessons In Building Tintin: A Wit.Ai Chatbot]]></title>
            <link>https://medium.com/@arwealthtech/lessons-in-building-tintin-a-wit-ai-chatbot-1e4b5211abcd?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e4b5211abcd</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[witai]]></category>
            <category><![CDATA[wealth-management]]></category>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 06:28:46 GMT</pubDate>
            <atom:updated>2020-11-13T06:28:46.493Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.linkedin.com/in/rohitsingh71/">Rohit Singh</a>, <a href="https://www.linkedin.com/in/mitul-shah-48087064/">Mitul Shah</a>, <a href="https://www.linkedin.com/in/chirag--shah">Chirag Shah</a></p><p>Couple of months back when we decided to build Tintin — a conversational chatbot for one of our systems in the private wealth space, it was a face-off between wit.ai (https://wit.ai/) and rasa (https://rasa.com).</p><p>Quick brief on these 2 very popular frameworks:</p><ol><li>Wit.ai: This is a Facebook product, and you will, in fact, need a Facebook id to login and pretty much do anything useful. Easy to use, completely cloud based and you do not need any previous knowledge of NLP algorithms to create a bot. Wit does the heavy lifting and takes care of the performance</li><li>Rasa: Independent product, has both on premise as well as cloud variants, lets you customise both the NLP model and engine</li></ol><p>The comparison between these frameworks looked like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/0*JLuAsG_MYNxiKEYS" /><figcaption>Figure 1: Comparing wit.ai and rasa</figcaption></figure><p>Eventually we decided to go for wit. Some key factors that added to the decision making process:</p><ol><li>Wit is a 0 cost, 0 install solution. The models are trained as well as hosted on wit.ai servers and exposed through APIs. Rasa seemed resource intensive and needed more hardware in comparison</li><li>Rasa has a feature to directly migrate wit.ai applications. Hence, if we encounter a major issue with wit.ai and wish to switch to Rasa, we won’t have to retrain our models in future</li></ol><p>Before we get into some implementation aspects, let’s take a quick look into Tintin and some behavioural aspects of the bot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/0*7JgQhFC-hYlgCSTb" /><figcaption>Figure 2: Tintin welcome message</figcaption></figure><p>The bot was built using React. It comes with options to accept a query in natural language as well as the most common queries being provided with a button like interface. Of particular interest is the My tickets button — we use JIRA (<a href="https://www.atlassian.com/software/jira">https://www.atlassian.com/software/jira</a>) as our bug tracking solution and the bot is integrated with JIRA using APIs that Atlassian provides. Briefly, here’s what happens when a client account manager wants to report an issue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/0*rghomFa3T34x5ne3" /><figcaption>Figure 3: Tintin request/response to create a ticket</figcaption></figure><p>When you click on create ticket, here’s what you will see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*Uf-DZ0nHFTyTEm0L" /><figcaption>Figure 4: Creating a ticket using the chatbot</figcaption></figure><p>Here’s a sample ticket:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/0*COjmKrSYC1SzeHZD" /><figcaption>Figure 5: Sample ticket, we’re about to hit submit</figcaption></figure><p>When you hit submit you’re taken back to the previous screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*YNu0_0lHmHae20eq" /><figcaption>Figure 6: Response from Tintin once the ticket is created</figcaption></figure><p>As you can see, Tintin is a bit moody. In the backend, this is how JIRA reflects ARBOT-429:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*EvWmOQMu5DvUddKz" /><figcaption>Figure 7: JIRA ticket for the issue created using Tintin</figcaption></figure><p>At a later time, when the account manager needs information on the ticket just punching in the ticket details does the trick, we will reflect the updated status from JIRA (again captured via API) here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/0*A5vCGZRbUTShwEHv" /><figcaption>Figure 8: Issue resolution message in Tintin</figcaption></figure><p>Now that you have seen the interface and how it functions, let’s try and understand how this is built using wit.ai. At it’s heart the idea is simple: the same question can be asked in multiple ways (that’s how natural languages are) but the response must always be the same. Let’s say you ask “in which format should we upload client excel” or “what’s the client excel file format” you mean much the same thing — you are trying to get a sample excel file in which you will upload some client information.</p><p>Implementation wise then, there’s got to be some system that actually maps the above 2 statements around file format request into the same normalised representation, and that normalised representation eventually calls the developer supplied response function <strong><em>on_txn_fileformat</em></strong>. What will this function return? If I were you, it’d just be an excel file with some sample data that I have likely stored in some S3 bucket.</p><p>Which basically brings us back to wit.ai. It is that system which helps map these 2 statements into the same normalised form. Bingo.</p><p>Let’s dig in. Wit is based on a the following concepts:</p><ol><li><strong>Utterance</strong>: the query/comment for which you want to train the model. For e.g. what is the stock price of AAPL?</li><li><strong>Intent</strong>: it refers to the intention/goal the customer has in mind when typing in a query or comment. For e.g. fetch_stock_price could be the goal of the input query</li><li><strong>Entity</strong>:<strong><em> </em></strong>it<em> </em>refers to the modifiers the end user uses to describe their issue. For e.g. stock of AAPL, T20 statistics of Sachin Tendulkar etc. Here AAPL, T20, Sachin Tendulkar are entities</li></ol><p>For every utterance then, the same has to be mapped to an intent with some optional entities tagged. The way this works is you make a couple of utterances and map it to the intent, and wit.ai can map related utterances to the same intent. Sample from Wit.Ai:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*HkeVNT_Pw7Mr6AOZ" /><figcaption>Figure 9: Wit.Ai User Interface</figcaption></figure><p>It’s a pretty easy to use interface. We just have to input our utterance, intent and entities for the query to get trained. On clicking “<strong>Train &amp; Validate</strong>”, it takes a few seconds to train after which you can query your model and validate the results.</p><p>Let’s validate the model for the query we have trained through wit.ai API:</p><p>curl -H ‘Authorization: Bearer XYZYXYXYXYXYXYXYYXY’ ‘<a href="https://api.wit.ai/message?v=20201008&amp;q=in%20which%20format%20should%20we%20upload%20client%20excel?pretty%27">https://api.wit.ai/message?v=20201008&amp;q=in%20which%20format%20should%20we%20upload%20client%20excel&#39;</a></p><p><strong>Output<em>:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/0*wsFkQdbYwXA4sI18" /><figcaption>Figure 10: Sample Output From Wit.Ai</figcaption></figure><p>In the output above, we see that the model has returned the trained query with a confidence of 0.9 and has recognised the “<em>client</em>” entity as well. Although, training the bot isn’t a very difficult task here, the confidence level starts dropping when you have multiple intents with similar input query. No different from how humans would respond no :-)?</p><p>Structurally, here’s how the chatbot backend looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/0*Bmp3d4ahiNqj8xbS" /><figcaption>Figure 11: Tintin internals</figcaption></figure><p>Our stack: AWS (Lambda, Postgres RDS, S3, API Gateway, CloudWatch), React, Python, Wit.Ai, Atlassian JIRA, Slack, Lumigo.</p><p>Let’s try and see what’s happening here. For every user query we are triggering a lambda (in case you are new to serverless, please check out https://aws.amazon.com/lambda/) that talks to wit.ai to get the intent of the query. Each query intent is mapped to a function which does the rest — for e.g. if you want to create a JIRA ticket the function calls Atlassian API, if you want to return a sample excel file the function fetches it from S3 all the while keeping an audit of these interactions in Postgres RDS with occasional alerts from the system going to Slack for monitoring.</p><p>Why did we choose lambda and not have a microservice? Infinite scaling for one, considerably lower costs for another and frankly the bot will only be used on demand — why run something 24x7 and waste resources? We use lumigo (https://lumigo.io/) for monitoring and analysis of our lambdas, as well as AWS CloudWatch.</p><p>Sample Lumigo Slack Alert, this is how our production support gets to know if anything needs attention:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*c_Q61MYEf33H1_ux" /><figcaption>Figure 12: Lumigo Alerts</figcaption></figure><p>The tech team keeps a sharp tab at the costs, and for this too we use Lumigo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*ZgtskQ2EXeJBmjvB" /><figcaption>Figure 13: Cost Analytics From Lumigo</figcaption></figure><p>Individual invocations are extremely cheap, and so far our monthly costs have been &lt;25$ for the initial chat volume we’ve handled.</p><p><strong>Concluding</strong> <strong>Remarks:</strong></p><p>That’s all for the day. Hopefully this was a fun read. Hit us up with your questions!</p><p>Before we go, at AnandRathi Wealth Management we are continuously pushing the barriers of what technology can achieve for our employees and clients. We are actively recruiting for backend, full-stack, application support and automated test roles across experience ranges; if you want to have a conversation please reach out to Rohit, Mitul or Chirag anytime on LinkedIn.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e4b5211abcd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Out A Serverless Analytics Dashboard With Metabase]]></title>
            <link>https://medium.com/@arwealthtech/building-out-a-serverless-analytics-dashboard-with-metabase-932e17bb5d43?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/932e17bb5d43</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cost]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[metabase]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Wed, 07 Oct 2020 05:58:46 GMT</pubDate>
            <atom:updated>2020-10-07T05:58:46.134Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.linkedin.com/in/chirag--shah">Chirag Shah</a></p><p>At AnandRathi Wealth Management we continuously develop new services with a sharp focus on keeping the costs within the business approved budget.</p><p>Business also expects the transparency from tech and needs to know how much individual modules cost them. Engineering teams need to know which modules are the most heavily used in production so that they can be further optimised.</p><p>Keeping all these requirements in mind, we decided to build a bunch of dashboards for our modules that are built cloud native on AWS Lambda.</p><p>So what’s the pain in having multiple AWS Lambda running in the cloud?</p><p><strong>1. Ownership: </strong>Lambda is being leveraged by almost every project that we’re building. After a while it becomes difficult to track which developer had developed the lambda. To get this in place you <strong><em>tag</em></strong> the lambdas appropriately but that does not solve the problem completely. You need to have a central view of all the lambdas and their owners so that you can filter on it</p><p><strong>2. Costs: </strong>Lambda might look low-priced when you’re just getting started. Even though you can limit the max. memory &amp; execution time and write the most optimal code, there are chances that costs can and eventually will start to escalate. To control this, you can use AWS Cost Explorer but it does not give you real time cost, granular filters, nor does it tell you about the number of invocations, memory consumed and other metrics</p><p><strong>3. Deprecation:</strong> Now that you’ve multiple lambdas in place, how will you track which lambda is most used, and which is not. And if it’s not used anymore it’s time to deprecate it</p><p><strong>4. Tags &amp; Sanity Checks:</strong> We can see which services cost how much using cost explorer, but to drill down on a project or business unit basis we need to add tags. And we need to ensure that these tags are present in every Lambda that is being created.</p><p>For the purposes of this article the business units that we mention are PWM (Private Wealth Management) and DWM (Digital Wealth Management). Common refers to both units.</p><h3>How do we address these challenges?</h3><p>We built our own solution using cloud hosted <strong>Metabase &amp; Postgres RDS:</strong></p><p>1. A python application that connects to AWS CloudWatch and AWS Lambda to fetch the metrics that like invocations per lambda, average duration, memory allocated &amp; the tags</p><p>2. Store all of these metrics in a Postgres database</p><p>3. Now, it’s time to plugin this database into Metabase and you can query on this data in any way that you need</p><p><strong>Here’s how one of our dashboards looks like:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*UG0YDG82n_ovY15GlnWOWw.png" /><figcaption>Figure 1: Serverless Analytics Dashboard</figcaption></figure><p>Let’s take a closer look to some of the questions:</p><p><strong>Cost: What’s the Month wise spend on across each all business lines?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*G-xaEzenfHOY2d_IiwFnrw.png" /><figcaption>Figure 2: Month on month costs</figcaption></figure><p><strong>Let’s filter the spend for September 2020:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*2LckDkC_BucPjyNMD2FYcQ.png" /><figcaption>Figure 3: Daily cost tracker</figcaption></figure><p><strong>Usage Tracking &amp; Deprecation: </strong>Which are the most invoked lambdas?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*ravhxEt2ZB3nE6gArHTQ1Q.png" /><figcaption>Figure 4: Which lambdas are the most used?</figcaption></figure><p><strong>Ownership: Which Projects &amp; lambdas does a person own?</strong></p><p><em>Hover on the dots and get the owners</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*t32RBBc42aOdvl0dhxoGRA.png" /><figcaption>Figure 5: Who owns what?</figcaption></figure><p><strong>Tags &amp; Sanity Checks: </strong>Which lambdas have not passed the Tags sanity check? Here’s the list of the lambdas which are not tagged appropriately and the team(s) need work to do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*jPVbVhq-QtWOg6jGb_IR7g.png" /><figcaption>Figure 6: Untagged lambdas</figcaption></figure><p>And we are just getting started here. We are putting up month-wise budget per project or Lambda and generate dashboards if the $$ spent is near the threshold, exceeded threshold etc. More on that another time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=932e17bb5d43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Netdata: A refreshing relook into monitoring]]></title>
            <link>https://medium.com/arwealthtech/netdata-a-refreshing-relook-into-monitoring-f90176cc81e2?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/f90176cc81e2</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[netdata]]></category>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Mon, 10 Aug 2020 07:39:52 GMT</pubDate>
            <atom:updated>2020-08-10T07:50:53.379Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://in.linkedin.com/in/arpansen">Arpan Sen</a> and <a href="https://in.linkedin.com/in/rajat-jain-42526134">Rajat Jain</a></p><p>At ARWealth, we are continuously building new systems in response to the continuously shifting business landscape. These could be extending good old legacy microservices deployed in EC2 or creating a brand new bunch of docker containers or serverless/lambda functions. With that comes the pain of monitoring these ever growing systems in production.</p><p>Personally, I have often wondered why the pain? A bit of introspection gives way to 3 distinct facts:</p><ol><li>Too many tools. There is an agent — something that collects the data, and then sends the data to a time series store. If you are using open source, probably prometheus, and then some nice UI front end — typically grafana. Since ARWealth is a slack shop, there’s also the task of sending alerts that needs to be performed. And then the agent for MySQL isn’t going to be the same as the agent for Redis or Nginx etc. Finding engineers who know these many tools and/or can quickly come up to speed and use these effectively has always been a historical challenge :(</li><li>Maintenance work that takes time, and isn’t counted as a business deliverable. That box where the TSDB was running does run out of space time to time, or need code/scheduled jobs to prune etc. And if you do forget, then boom — suddenly the cool monitoring alerts stop in production!!</li><li>Lots of configurations. Sure, for the more advanced users amidst us that actually makes great sense but on day 1 it’d be nice to have a certain minimal set of metrics that’d show up automatically in production without much by way of adding configurations. And yes, it does help if the UI looks cool too!</li></ol><p>That being the context, it was a sheer pleasure when we came across netdata. Installation is actually a breeze. In a EC2 where we had about 25 docker containers running we went ahead and punched in</p><blockquote>bash &lt;(curl -Ss <a href="https://my-netdata.io/kickstart.sh">https://my-netdata.io/kickstart.sh</a>) — no-updates — stable-channel — disable-telemetry</blockquote><p>That was about it. Netdata installed. We didn’t tweak any configuration file. Now there are 2 distinct ways via which you can actually check out the output. One option was going to the host where the netdata agent is installed checking out <a href="http://localhost:19999,">http://localhost:19999</a>, but our strict IAM policies prevent anyone from ssh into prod boxes, and more importantly, we wanted to get the view from multiple boxes consolidated into a single ui.</p><p>Enter netdata.cloud — this is a very neatly designed UI, and looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XD3yuuKDh5uagtB3Yep6Q.png" /><figcaption>Figure 1: Netdata Cloud</figcaption></figure><p>At the left hand side, we have what is known as war rooms, which you can create. For us, a business specific classification made a lot of sense. Now in each of these rooms, we have to add the node(s) where the netdata agent was installed. This has been niftily implemented, and once you generate the claim command all it takes is to go to the EC2, type it in and just wait for a few seconds for the data to show up in the cloud console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DnjHoIOSnSxoMl4epr2ug.png" /><figcaption>Figure 2: Adding nodes to the rooms</figcaption></figure><p>The best part of this is that we have both an EC2 level view as well as a docker container level stats. Netdata automatically reads the container related information from cgroups, and all the available containers in this box show up on the right hand side of the panel. Clicking on any container brings up the individual container level stats:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vqSDwBwo4k2Bb4dZOFleQ.png" /><figcaption>Figure 3: Container level stats</figcaption></figure><p>The interesting thing for us was so far we did not have to do anything to actually make any of these dashboards show up. Nor did we have to set up any storage etc. Most of the default metrics showing up are already very useful:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*1bn7SnlNREbSqiFuRtrIjw.png" /><figcaption>Figure 4: Very cool looking ui</figcaption></figure><p>Frankly, by this time, I was personally sold on netdata and didn’t need much convincing. Even at that though, shortly we see a red dot against one of the rooms. Curious, we quickly found that netdata has detected that the CPU was loaded (it was a 2core box where we were experimenting) and RAM too was on the lower side:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4xkvWsQ1mQwKRz9XHlaKDA.png" /><figcaption>Figure 5: Netdata alerts</figcaption></figure><p>We wish there was a simple enough way for us to configure slack alerts right from the netdata ui at this stage, and that’d have completed the monitoring loop for us. I believe that’s something the netdata team is working on. Drilling down on the alerts look nice too:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*1V_1ESs27LNbAahR-KjdOw.png" /><figcaption>Figure 6: Netdata alerts drill down</figcaption></figure><p>You can figure out the node is an Ubuntu just by looking at the UI once. Small things, but they do matter a lot actually.</p><p>That’s all for this article. It’s been a while a tool has been this delightful. We fully expect to tie up the suite of our heterogeneous tech stack with netdata, and see how the experience goes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f90176cc81e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/arwealthtech/netdata-a-refreshing-relook-into-monitoring-f90176cc81e2">Netdata: A refreshing relook into monitoring</a> was originally published in <a href="https://medium.com/arwealthtech">arwealthtech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Browser Caching: A Hands On Guide]]></title>
            <link>https://medium.com/@arwealthtech/bypassing-browser-caching-a-hands-on-guide-5c517e1bdc7a?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c517e1bdc7a</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[cache-control]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Mon, 11 May 2020 13:40:53 GMT</pubDate>
            <atom:updated>2020-05-11T13:40:53.639Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://in.linkedin.com/in/ronaksonigara">Ronak Sonigara</a>, <a href="https://www.linkedin.com/in/sidhantj">Sidhant Jain</a>, <a href="https://in.linkedin.com/in/pratik-gode-a288a3122">Pratik Gode</a> and <a href="https://in.linkedin.com/in/darshan-gerra-45735385">Darshan Gerra</a></p><p>At ARWealth we work on a lot of new systems for our internal use as well as for external consumption. This means we have to make a lot of deployments in different environments be it for the purpose of going live, staging or testing a new feature. Browser caching is a way that the browser stores resources of the webpage on local memory to save on network bandwidth and time taken. This is a very useful feature which comes in-built with most browsers however this can result in issues, one of which we faced during a recent deployment of one of our web applications.</p><p>The issue we faced was that we released a small but very important UI change and it just would not reflect on some browsers. Users had to manually force refresh or clear cache for the browser to request the new resources and clearly it is not a viable method of using web applications. And what’s worse, it seemed to not follow a pattern on which browser/machine it was breaking. We realized pretty quickly that it was a caching issue where some browsers were just re-using the old version based on the usage of the user for the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*cg-dof-Pn72gVUv0lyVc1w.png" /><figcaption>Figure 1: Checking for API return status code 304 in developer tools</figcaption></figure><p>As you can see above, the browser shows a Status of 304 for the main.chunk.js file which contains all of our ui code (in react). 304 means that the client just re-uses old resources and registers it as a success hence the new changes are not reflecting.</p><p>We started thinking of ways we could overcome this issue. Ideally we only wanted it to fetch a new version on every deployment and still retain cached memory for the same version going ahead so as to reduce future loading times.</p><p>The first thing we tried was editing our index.html file. This is responsible for serving all of our JS content to the browser. React is essentially written in JSX and converted into HTML in runtime and index.html dictates which is the root of our react app along with other app level configs. A quick search revealed that adding meta tags of <strong>content-type</strong> indicates to not store cache and re-validate the app on refresh. What these tags do is that they force the browser to fetch the index.html file every time on refresh. We tried adding them to our index.html file as shown below, however that did not work for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*OpBfOgH-tasemjahdLRnpQ.png" /><figcaption>Figure 2: index.html with no-cache directive</figcaption></figure><p>This was likely due to this approach being viable for pages written in pure HTML whereas we use React for our front-end.</p><p>Our React code is currently being served out of S3 (Simple Storage Service) which is the standard storage space for the static content delivered by AWS. We also use Bitbucket by Atlassian for our code repository to check-out and share code. Bitbucket offers an ability to create pipelines that transfer your code from their repositories to various hosting services including AWS S3. So we have this configured with our AWS credentials as well as our AWS S3 ARN which is the unique identifier used by AWS for all of their services. This pipeline is set in such a way that it runs every time code is pushed into the master branch.</p><p>So the next thing that we thought of was that we could maybe delete all of our resources in the S3 bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*WWQv3fDPw1e_2ikNYL00qw.png" /><figcaption>Figure 3: S3 bucket for our static files</figcaption></figure><p>We figured that when there would be totally new files in the S3 bucket, it would trigger the browser to fetch all resources instead of using cached ones. However, when we deleted and pushed our code again, some browser’s were still using the cached version.</p><p>Since there were no other configurations that we could change in S3 that would have an affect on this, we decided to move on in our search for the solution. Soon, we found an open source npm package called react-clear-cache. (<a href="https://www.npmjs.com/package/react-clear-cache">https://www.npmjs.com/package/react-clear-cache</a>)</p><p>What this package essentially does is, is that it creates a meta.json file in our application with a build version number. Next, it adds a few lines to our code which essentially tell the browser to force clear cache every time it receives a new build version number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*TqzxjUp_krowpkrh4IviLA.png" /><figcaption>Figure 4: react-clear-cache</figcaption></figure><p>But this also did not seem to work. We realized the problem with all these approaches were that we were making changes in the code. But the entire problem was that the browser was not receiving the latest code or else there would not have been an issue in the first place.</p><p>So finally, we decided to change our configuration in the Bitbucket pipeline that pushed our code into S3 for deployment. Since our code is being served through the S3 bucket and it is from here that we are receiving a status code of 304 on the client, we figured out that we needed to trigger a fresh response from S3 for the browser to receive new code. We figured we should try to add the force refresh tags into our S3 settings while the code is being uploaded through our Bitbucket pipeline. So we made these changes in our Bitbucket pipeline yml file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*SeEGx1Pcc_cPw70_HhwWEg.png" /><figcaption>Figure 5: Check out CACHE_CONTROL variable</figcaption></figure><p>Notice here, we have added the CACHE_CONTROL, DELETE_FLAG and EXPIRES flags for the deployment settings for our React code. The below screenshots are from before and after adding the tags into our pipeline settings. You can notice that the same request was earling returning a response of 304 from S3 which meant that the browser should use it’s cached version to serve content. Post the change, it now sends a fresh 200 response after a new deployment which makes our change visible to our users without them having to manually erase their cache.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*8rFXgMe7SKfrZ_41FGx-yQ.png" /><figcaption>Figure 6: Browser using cached content</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*YqAmjxNjDEwBUgo2RYtf9A.png" /><figcaption>Figure 7: Browser getting the content afresh from S3 post deployment</figcaption></figure><p>This worked for us! For any organization running systems on the web new deployments are always required for new features and bug fixes and one cannot expect their users to clear their cache every time this event occurs. We looked at a few of the solutions the Internet had to offer us but were surprised to find that a solution was not readily available in the first link we opened for the latest tech stack being used. Hope this helps you if you’re stuck with the same!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c517e1bdc7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern chatops from within Slack: An ARWealth Take]]></title>
            <link>https://medium.com/@arwealthtech/modern-chatops-from-within-slack-an-arwealth-take-de5ecdbdcca6?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/de5ecdbdcca6</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Sun, 03 May 2020 13:12:49 GMT</pubDate>
            <atom:updated>2020-05-03T13:12:49.361Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://in.linkedin.com/in/mohit-nathani-987825100">Mohit Nathani</a> and <a href="https://in.linkedin.com/in/arpansen">Arpan Sen</a></p><p>At ARWealth we always have a reasonably good number of existing and new projects running in parallel, and with new people joining all the time it’s never an easy task to bring everyone up to speed and help them develop a holistic understanding of our cloud assets in quick time. Pursuant to the same, and in line with our core philosophy of complete transparency in everything we do, we recently ran a series of successful experiments in integrating modern chatops with Slack, our digitial workspace platform.</p><p>For a start, AWS itself has a native chatbot available for use from within Slack. The syntax for the same is the familiar AWS CLI. Here’s how it looks when you are trying to figure out the number of ec2 instances from within slack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdzL-pbqF_tEYqG_UoGyog.png" /><figcaption>Figure 1: AWS CLI from within slack</figcaption></figure><p>So what’s happening here? Mohit is asking the @aws user (which is basically the AWS Chatbot app) the list of t2.micro ec2 instances in region ap-south-1 and the chatbot is responding. The good part here: you have a lot of information available to you. The bad part: <em>You have a lot of information available to you</em>, probably more than what you need if you are not a devops engineer and just trying to make sense of the overall system.</p><p>How did we install the @aws bot in Slack? Please visit <a href="https://slack.com/apps/A6L22LZNH-aws-chatbot">https://slack.com/apps/A6L22LZNH-aws-chatbot,</a> your screen should resemble something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i7jbGE_2KYeqiho5-bz9fA.png" /><figcaption>Figure 2: Installing AWS Chatbot in Slack</figcaption></figure><p>Go ahead and install the chatbot. You are now set. The challenge as we see is that the information is comprehensive but can be a bit too much at times, and visually not appealing. That brings us to 2 new bots: CloudSummary and Opsidian. To install CloudSummary, go to <a href="https://slack.com/apps/A5M9ECSQJ-cloudsummary">https://slack.com/apps/A5M9ECSQJ-cloudsummary</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0y3_CFzJL_9BVZHps_Eqpg.png" /><figcaption>Figure 3: Install CloudSummary in Slack</figcaption></figure><p>To install Opsidian, visit <a href="https://slack.com/apps/A2F4WCHAM-opsidian">https://slack.com/apps/A2F4WCHAM-opsidian</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wWBhHmPWzkIQX-P_x1y3wg.png" /><figcaption>Figure 4: Install Opsidian in Slack</figcaption></figure><p>Once you have installed these 2 bots the interface is kinda very similar. To run CloudSummary post account configuration, run /cs help and here’s what you should get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SguG4y6v9SASmWe4vWPqFw.png" /><figcaption>Figure 5: Output from /cs help</figcaption></figure><p>To get a list of SNS topics configured in your system, punch in /cs sns -l and here’s how it looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ny6XpzEn4VEhcDb0T0iCuw.png" /><figcaption>Figure 6: List of SNS topics from CloudSummary</figcaption></figure><p>To get the list of route53 hosted zones type in /cs r53 -z and here’s the output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vyMU_FytgxLSi-RZ0nhf-g.png" /><figcaption>Figure 7: List of route53 hosted zones in CloudSummary</figcaption></figure><p>So let’s see now — we can get the list of ec2 instances, SNS topics, route53 hosted zones etc. How about databases then? If you have some RDS instances or S3 buckets or EMR clusters you will need easy accesses to them too right? Unfortunately, CloudSummary does a really good job at what it does but does not support RDS or S3 or EMR currently. Which is what brings us to Opsidian. Post the account setup, when you type in /ops help here’s how the output looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n2DiK6_M8dc53RxiWt3ULg.png" /><figcaption>Figure 8: Output for /ops help</figcaption></figure><p>Wow!! That’s a lot of services out there, definitely more than CloudSummary. To get more details about our ec2 instances, key in /ops ec2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S4cpvV1MEXv2y9QbCIXFNQ.png" /><figcaption>Figure 9: Output from /ops ec2</figcaption></figure><p>Cool. The command line system is guiding us to take this forward. Now let’s check RDS since that’s what got us here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzsi-rQIxrkeNvhqg0V_Og.png" /><figcaption>Figure 10: Exploring RDS with Opsidian</figcaption></figure><p>We can get the EMR clusters too:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ylib0mTsA6MMcgnJ6mVP2w.png" /><figcaption>Figure 11: Exploring EMR with Opsidian</figcaption></figure><p>The challenge with Opsidian is that the interface is not as simple as CloudSummary and while CloudSummary supports VPC and SNS, Opsidian right now does not. Opsidian, of course, as we just saw supports RDS, EMR etc. which CloudSummary does not. Net-net: we need both. CloudSummary is free to use, and Opsidian for now is free (it’s in beta).</p><p>Finally, let’s look into the permissioning model for these tools. Who can punch in /cs and /ops and start running commands? The good thing is that the permissioning model in both is similar and well thought out. Let’s say we want to add a user in CloudSummary. Here’s what we do:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpHBKnzPdGL3vIBviP7Wng.png" /><figcaption>Figure 12: User Management in CloudSummary</figcaption></figure><p>A Slack admin can always add another Slack user as admin or regular user. Let’s say we want to add @Mohit Nathani as an admin user, so that’d be /cs usr -a @Mohit Nathani -t admin and we are done. An admin user can add other admin or regular users, and browse the cloud assets while a regular user can only browse the assets.</p><p>For Opsidian, the model is similar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NRsGDkbtDrtKcjKBdixMnQ.png" /><figcaption>Figure 13: Opsidian User Management</figcaption></figure><p>That’s about it for now. We have learnt how to integrate multiple modern chatops tools right within slack, and how to use them and relative merits. Slack itself is an extremely powerful medium, and together with these tools (which are all work in progress, but nonetheless extremely useful as-is) the transparency and ease of monitoring is absolutely unparalleled.</p><p>Have fun with chatops!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de5ecdbdcca6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sometimes 96 cores aren’t enough]]></title>
            <link>https://medium.com/arwealthtech/sometimes-96-cores-arent-enough-d91b55d395ec?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/d91b55d395ec</guid>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Sun, 23 Feb 2020 15:51:36 GMT</pubDate>
            <atom:updated>2020-02-23T15:51:36.195Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://in.linkedin.com/in/arpansen">Arpan Sen</a>, <a href="https://www.linkedin.com/in/mohit-nathani-987825100/">Mohit Nathani</a> and <a href="https://www.linkedin.com/in/sidhantj/">Sidhant Jain</a></p><p>At ARWealth we deal with data. Amidst all the different kinds of data we deal with, there’s a particularly interesting one that stands out from the rest — it’s the data around Futures and Options the firm deals with. And sometimes, this data needs to generate insights fast. Very fast. Like near real time, particularly when business needs to take some important decisions pursuant to the outcome of these insights.</p><p>Here’s a sample piece of code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lfvxkLAQFokOGfXahTNBfw.png" /><figcaption>Figure 1: Using multiprocessing pool</figcaption></figure><p>Typically input_frames is an array of 5000 Pandas dataframes. Each dataframe has a range of information including around 1100 possible values of Nifty (benchmark index for the Indian markets), volatility, interest rate etc. The compute function will be performing a range of mathematical operations pertaining to option pricing on each data frame based on the values it contains. We intend to distribute the computation to a large number of cores using multiprocessing.Pool so that total time required to completion is brought down.</p><p>That brings us to AWS — we need the computations to wrap up very quick. Let’s check out some of the options we have here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o0Xpg5Oi2-3tl8UF1ZOCVg.png" /><figcaption>Figure 2: AWS Instance Types</figcaption></figure><p>There’s a range here — all the way from m5a.large sporting 2 cores to m5ad.24xlarge being the beast with 96 cores. Let’s begin by looking into the Pool class. Inside the constructor, here’s what we see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybPhhJ5HHCl-SrLpSjI7NQ.png" /><figcaption>Figure 3: Inside the Pool constructor</figcaption></figure><p>Digging into _handle_workers method, we are here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z9PoiOU7HI51SOwaPRP3wQ.png" /><figcaption>Figure 4: Inside the _handle_workers code</figcaption></figure><p>_handle_workers calls _maintain_pool, which eventually calls _repopulate_pool. The code for _repopulate_pool clearly shows that the scalability of the code is predicated on the number of cores we allocate. self._processes is initially set to the core count and self._pool is 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q7DOs3QzAQ0BGjXFYk1_xQ.png" /><figcaption>Figure 5: _repopulate_pool code</figcaption></figure><p>Now a slightly closer look at the map function: the first argument is a function, the second argument is an iterable which in our case is an array of dataframes. Let’s look into the code for the map function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_uEjS_yQ9vTrzqMoup4Tw.png" /><figcaption>Figure 6: The map function</figcaption></figure><p>So map calls _map_async, which is where we are headed now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gb2mMFzjheytMu32EM2J9g.png" /><figcaption>Figure 7: Internals of _map_async</figcaption></figure><p>The code above clearly highlights that the iterable is chunked into batches: for an array of 5000, the total number of chunks is approx 5000/4*n where n is the number of cores allocated. Let’s say if n = 50, then chunk size = 25 and the number of worker processes running is 50. As n increases, available workers go up and chunk size down, so the time it takes for each worker process to wrap is going to come down linearly.</p><p>Performance now being established, let’s look into the costs; head over to <a href="https://calculator.aws/">https://calculator.aws:</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQ9F8AD1RivBD7hFaVtcrg.png" /><figcaption>Figure 8: Estimating cost of a 96 core vCPU box</figcaption></figure><p>At on-demand pricing, we are doing &lt; 3$/hr which is good enough for our purposes. We really don’t expect our simulations to run for hours — in fact we expect to wrap up in a few mins. That’s the whole purpose of it no? Why else would we go in for a 96 core machine?</p><p>Now the outcome: At 96 cores and 5000 dataframes our simulation for options prices based on variability in nifty prices and a few other factors completed at around 6–7 mins. Is that enough? Not really but this is a good start. We now have established a benchmark for future performance improvement.</p><p>Next steps: Multiprocessing pool and AWS collectively give us the ability to do a lot of heavy lifting without focusing a lot about the underlying details. There are other frameworks like dask etc. that we would try out next, and start performing low level optimizations as well using numba/JIT etc. More on this on the next article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d91b55d395ec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/arwealthtech/sometimes-96-cores-arent-enough-d91b55d395ec">Sometimes 96 cores aren’t enough</a> was originally published in <a href="https://medium.com/arwealthtech">arwealthtech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Many Ways Of Granting User Access To AWS S3 Bucket]]></title>
            <link>https://medium.com/arwealthtech/the-many-ways-of-granting-user-access-to-aws-s3-bucket-d54592179c7c?source=rss-601ba2c34cfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/d54592179c7c</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[AnandRathi Wealth Tech]]></dc:creator>
            <pubDate>Tue, 10 Dec 2019 16:09:25 GMT</pubDate>
            <atom:updated>2019-12-10T16:09:25.175Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://in.linkedin.com/in/arpansen">Arpan Sen</a> and <a href="https://www.linkedin.com/in/mohit-nathani-987825100/">Mohit Nathani</a></p><p>At ARWealth we deal with data. Terabytes of sensitive financial data. Quite often we have to selectively allow specific internal users access to that data. Last week, we had a new teammate requiring access to about 2 TB data and we decided to use this opportunity to take a fresh look into S3 user permissioning models.</p><p>First things first, you need to create the user ahead of anything. Head to the Identity and Access Management section of the AWS Console. You should see something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Owtw3QgsJmxuR823gCEDg.png" /></figure><p>We have added the user for programmatic access. From there on, couple of options exist. Let’s do nothing for now and just move on. The next screen would be something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Okr6dqmuSPfOfY85OSE-Iw.png" /></figure><p>Let’s again do nothing and move on. Next is tags, again nothing. Finally, the review screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybQBgoCTmqoRMsYkIvbAKA.png" /></figure><p>Once the user is added, you will get the Access Key ID and Secret Access Key. Download the CSV, and keep it safe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQASQIBERCLFpDoU-jmk4g.png" /></figure><p>At this time we have successfully created a user but not really given any permissions. Let’s see what some of our options could be. One option is to head straight to the bucket the user needs permission for. On the main S3 page you should find the bucket list, something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qbkp5g4nUaW4Q-FdrEHg4A.png" /></figure><p>We would like to permission Dorothy for arwealth.tradingtech.strategy. Click on the bucket name, from there on the Permissions tab and finally the bucket policy. You should find yourself here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuAdVZWSWE0t9ROTCJWysg.png" /></figure><p>The policy is a JSON. We need to generate the JSON to our liking, and then add it here. Let’s click the Policy generator link, and here’s what will come up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhJgw2gnLlj83fnrooc6lg.png" /></figure><p>The bucket will have an ARN or an Amazon Resource Name, and so does every IAM user including Dorothy. Let’s check the ARN details for the bucket:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*L6n_A0NDgDD7qO1IGPV7dw.png" /></figure><p>Click on the Copy Bucket ARN button and get hold of the ARN. For our case, it’s arn:aws:s3:::arwealth.tradingtech.strategy. This is it’s Amazon Resource Name. Next ARN for Dorothy from the IAM console: arn:aws:iam::487340******:user/dorothy.sayers and add it to Principal. For permissions, let’s restrict ourselves to just a few Get and List functionality. Click on Generate Policy, and here we are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EnlSUeCm8g4Ny3VOIsdejw.png" /></figure><p>Copy this and let’s go back to the Bucket Policy Editor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKoAE-YP9-Z-qpjqaP8L0g.png" /></figure><p>So far it’s been pretty simple. We have allowed 3 operations for a specific user (ARN in AWS parlance) for a specific bucket. Don’t just hit save yet. We would like to give Dorothy permissions to the bucket and it’s contents (if nested). Let’s make some minor modification to Resource before saving, <em>this is important</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RPE84Ch6zekTtqcvzRWvPA.png" /></figure><p>Now we are all set. Dorothy can use aws cli to check out and access the contents of the bucket. The question that does arise here is that Dorothy won’t be the last user who will need access to this bucket, and Dorothy might in future need access to other buckets. As AWS administrators, we need to get more efficient in tracking what all accesses Dorothy gets. Should Dorothy change the group, we will need to revoke accesses promptly, right?</p><p>That’s where the concept of groups and group level policies kick in. Dorothy’s a quant and she need accesses to specific buckets. Why not create a group and a group level policy and assign Dorothy the group instead of tinkering with bucket level policies? Sounds like a plan? Let’s head on to IAM console and create a new policy — head to the JSON editor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHrqqdygTqEcStw7cChgwg.png" /></figure><p>Now let’s add the policy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eySysrF7xxnsEPBOPONI2A.png" /></figure><p>Let’s call this the ARWealthQuantStratsPolicy, which allows a quant access to specific buckets. Once done, we need to create a quants group and add this policy to the group:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OMWQf9Z2MhqOd10-jreo-Q.png" /></figure><p>In the next step, attach the policy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8Iy7cdS0C9qUUULs1sxAg.png" /></figure><p>Click create group and we are done. Here’s how it looks, and note the group doesn’t have any user yet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8o7eHWdsV3aF_WjpbmMFw.png" /></figure><p>Click on arwealth.quants and you will reach the Summary page and see something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ie6FLAyVqwu2ljYDfoH7_g.png" /></figure><p>That’s about it. Click on Add Users to Group. You should find Dorothy. Add the user to the group and here you are now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wNAlpyYHCh63hIpK9HXROw.png" /></figure><p>Now Dorothy is a part of the quants group with the right policy and as an admin, we can easily track the ownership(s). We can remove the bucket level policy now.</p><p>Hopefully this was useful. We’ll be back soon with more insights as we venture deeper into the cloud!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d54592179c7c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/arwealthtech/the-many-ways-of-granting-user-access-to-aws-s3-bucket-d54592179c7c">The Many Ways Of Granting User Access To AWS S3 Bucket</a> was originally published in <a href="https://medium.com/arwealthtech">arwealthtech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>