<?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 Ben Taylor on Medium]]></title>
        <description><![CDATA[Stories by Ben Taylor on Medium]]></description>
        <link>https://medium.com/@benmadeit?source=rss-7950cbd43f30------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3LQoYDsrmzbHJ1JD.jpg</url>
            <title>Stories by Ben Taylor on Medium</title>
            <link>https://medium.com/@benmadeit?source=rss-7950cbd43f30------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 09:14:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@benmadeit/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[Why people hire “DevOps”]]></title>
            <link>https://medium.com/drie/why-people-hire-devops-75bb207eaf7d?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/75bb207eaf7d</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Thu, 09 Feb 2017 18:06:14 GMT</pubDate>
            <atom:updated>2017-02-10T10:35:02.899Z</atom:updated>
            <content:encoded><![CDATA[<p>We put out a blog post about <a href="https://blog.drie.co/hiring-devops-talent-7c2a63fa70c3#.68t4we469">hiring DevOps</a> the other day and got a response through twitter.</p><h3>Mongrel Immigrant on Twitter</h3><p>@drie_co You&#39;re trolling me now - https://t.co/qQJRmzvPuv</p><p><a href="http://jamesabley.com/devops-defined/">James’ point</a> was a good one; my view is that DevOps a different way of approaching problems which makes teams more productive and systems more reliable. It isn’t and shouldn’t be about a person.</p><p>That said, I think there is definitely a skill set and, more importantly, a mindset associated with DevOps which many organisations don’t have but are increasingly understanding that it’s probably something they want. It’s therefore understandable that they try and hire for it and I guess many people fall back on using the keyword “DevOps” in the hope that the right people show up.</p><p>Having worked with some partners who tried this, it doesn’t always end up so well, but then again it’s hard to be good at hiring for something you don’t completely understand or already have. It’s also the case that the sort of “DevOps-ie” people tend to know they’re valuable and charge a premium for their services.</p><h3>Kalbir Sohi on Twitter</h3><p>@jabley @drie_co ... some very active &quot;keyword stuffing&quot; so that we can reach the people who think that devops *is* a job).</p><p>The reason we’re using the word is more self serving; we’re trying to reach out to the people who are trying to “hire a DevOps” and show them an alternative. The <a href="https://drie.co/">drie platform</a> is pretty opinionated about how you should build and deploy software to the cloud; but the beauty is that it makes it a lot simpler for your existing teams to get started.</p><p>Rather than hiring one new team member to “do the DevOps” (which is not going to go awesomely), we try and empower your entire team to make them more productive while giving them the sorts of skills and mindset you were looking for in the first place.</p><p>I’m pretty sure we can solve this with a better collective noun for “people who understand DevOps, are good at it, and (critically) I am willing to listen to when they suggest making fundamental changes to how we work”. Any suggestions?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75bb207eaf7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/why-people-hire-devops-75bb207eaf7d">Why people hire “DevOps”</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E2E Encryption with Lambda, CloudFormation and ACM [Part 2/2]]]></title>
            <link>https://medium.com/@benmadeit/e2e-encryption-with-lambda-cloudformation-and-acm-part-2-2-a3ab1d72a477?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3ab1d72a477</guid>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Mon, 12 Dec 2016 10:01:02 GMT</pubDate>
            <atom:updated>2017-01-06T11:14:44.661Z</atom:updated>
            <content:encoded><![CDATA[<p>This article finishes showing how to implement encryption of connections to your backend instances on AWS. Check out the first part for a <a href="https://medium.com/@benmadeit/e2e-encryption-with-lambda-cloudformation-and-acm-2b8020d6c6a4">primer on CloudFormation</a>.</p><p>So far I’ve shown how to use Route53, ACM and CloudFormation to add free SSL certificates to an Elastic Load Balancer in front of a simple Hello, World! app. You can follow along using <a href="https://github.com/bewt85/AwsCertificateManagerDemo">the code on GitHub</a>.</p><h3>Step 3: Hard coded backend certificates</h3><p>This is all pretty common stuff, it gets much more interesting when we start encrypting the connections to our backend instances.</p><p>This can be achieved using the <a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/cf_backend_cert.yml">cf_backend_cert.yml</a> template.</p><pre>AppSecurityGroup:<br>    Type: AWS::EC2::SecurityGroup<br>    Properties:<br>        GroupDescription: Limit access to the app instances<br>        SecurityGroupIngress:<br>        - IpProtocol: tcp<br>          FromPort: 8443<br>          ToPort: 8443<br>          SourceSecurityGroupId: !GetAtt [ElbSecurityGroup, GroupId]</pre><p>The first big change is that we’ve changed the security group so that the firewalls don’t permit access to the backend instances on port 8080; they can now only be accessed on port 8443 which we’ll use for the encrypted traffic.</p><pre>AppLaunchConfig:<br>    Type: AWS::AutoScaling::LaunchConfiguration<br>    Properties:<br>    Properties:<br>        ImageId: ami-a4d44ed7<br>        SecurityGroups:<br>        - !GetAtt [AppSecurityGroup, GroupId]<br>        InstanceType: t2.nano<br>        UserData:<br>            !Base64 |<br>                #cloud-config<br>                ---<br>                packages:<br>                - git<br>                - python-pip<br>                - stunnel4<br>                write_files:<br>                - content: |<br>                    from flask import Flask<br>                    app = Flask(__name__)<br></pre><pre>                    @app.route(&quot;/&quot;)<br>                    def hello():<br>                        return &quot;Hello, World!&quot;</pre><pre>                    if __name__ == &quot;__main__&quot;:<br>                        app.run(port=8080)<br>                  path: /etc/hello.py<br>                  permissions: &#39;0644&#39;<br>                - content: |<br>                    -----BEGIN PRIVATE KEY-----<br>                      &gt;&gt;&gt; SNIPPED FOR BREVITY &lt;&lt;&lt;<br>                    -----END PRIVATE KEY-----<br>                  path: /etc/stunnel/elb-backend-private.key<br>                  permissions: &#39;0400&#39;<br>                - content: |<br>                    -----BEGIN CERTIFICATE-----<br>                      &gt;&gt;&gt; SNIPPED FOR BREVITY &lt;&lt;&lt;<br>                    -----END CERTIFICATE-----<br>                  path: /etc/stunnel/elb-backend-cert.pem<br>                  permissions: &#39;0444&#39;<br>                - content: |<br>                    output=/var/log/stunnel-elb-backend.log<br>                    pid=/var/run/stunnel4/elb-backend.pid<br>                    setuid=stunnel4<br>                    setgid=stunnel4<br>                    client=no</pre><pre>                    [ELB]<br>                    cert=/etc/stunnel/elb-backend-cert.pem<br>                    key=/etc/stunnel/elb-backend-private.key<br>                    accept=0.0.0.0:8443<br>                    connect=127.0.0.1:8080<br>                  path: /etc/stunnel/elb-backend.conf<br>                  permissions: &#39;0644&#39;<br>                runcmd:<br>                - pip install flask gunicorn gevent<br>                - sed -i &#39;s/^ENABLED=0/ENABLED=1/&#39; /etc/default/stunnel4<br>                - touch /var/log/stunnel-elb-backend.log<br>                - chown stunnel4 /var/log/stunnel-elb-backend.log /etc/stunnel/elb-backend-private.key /etc/stunnel/elb-backend-cert.pem<br>                - systemctl restart stunnel4<br>                - cd /etc/ &amp;&amp; gunicorn hello:app -b 127.0.0.1:8080 -k gevent</pre><p>The biggest changes are in the launch configuration which is used to setup the backend instances. Here I have used the launch configuration to put a self signed SSL certificate and it’s private key onto the server and setup stunnel4 to terminate SSL. It goes without saying that THIS IS REALLY BAD PRACTICE. Sensitive key data like this should not be committed to Git (especially a public repo but I’d strongly encourage not doing so in a private repo either). You might also think that it is OK to generate the keys locally and insert it into the template just before using it to deploy the stack in CloudFormation. That’s marginally better but the private key will still be human readable to anyone with access to CloudFormation (via the Template tab).</p><p>It is possible to argue that this is a low risk because: only trusted admins will be able to access the CloudFormation console; the developer who produced the data probably used sensible settings and cleared up their local copy sensibly; and the certificate is self signed and therefore not useful for anything except this app. That said, I’ve seen plenty of examples where we make these sort of compromises now based on assumptions about how we’re using things which then prove to be false in the future. I’d therefore be keen to pick a solution which better fits with other developers (and my) future assumption that things like private keys have been kept secret.</p><p>If you created this stack, then don’t forget to delete it.</p><h3>Step 4 — Automatically generated certificates</h3><p>I’d prefer a solution which:</p><ul><li>doesn’t rely on the developer remembering the correct settings to create good certificates;</li><li>doesn’t rely on the developer being good at clearing up secrets from their local environment (including making assumptions that they’re good at encrypting their local disk; their swap files are encrypted etc.);</li><li>doesn’t make it easy for an administrator to read the secret keys (I prefer solutions which make it easy to hide secrets or at least audit that they’ve been read); and</li><li>uses automation to reliably get round these issues.</li></ul><p>One pattern which meets these objectives is to use AWS Lambda as part of a Custom Resource in the CloudFormation template. Custom Resources allow you to supply code which is run when a stack is created or updated. In our case, that code is going to: create a new certificate, private and public key when a stack is created; save the private key and certificate into an S3 bucket which most people cannot access; load the public key into the load balancer so that only instances with the private key will be trusted; grant permission to the EC2 instances to load the private key and certificate (and only their own) from the S3 bucket at startup; and reuse an existing certificate and private key for a new instance if the stack is updated or if a new instance is added to the auto scaling group.</p><p>The Lambda is just a Python script which has a method which is configured to handle events created by CloudFormation. The code is in <a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/certificate_lambda">certificate_lambda</a>. The code needs to be packaged up into a zip file before it can be deployed, this can be done using the <a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/certificate_lambda/package.sh">package.sh</a> script. Take a look at the <a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/certificate_lambda/README.md">README</a> for instructions on creating your own copy of the Lambda.</p><pre>ElbBackendCertificate:<br>    Type: Custom::ElbBackendCertificate<br>    Properties:<br>        ServiceToken: !Ref CreateElbBackendCertificatesArn<br>        AppDomain: !Ref Domain<br>        AppName: !Ref Domain<br>        AppS3Bucket: !Ref CertificateBucket</pre><p><em>Custom resource in </em><a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/cf_automated.yml"><em>cf_automated.yml</em></a></p><p>This new resource triggers the Lambda and passes the properties used when you created the stack. The Lambda returns a dictionary of data including PublicKey and CertificateS3Key which are used later in the template.</p><p><em>Before:</em></p><pre>+ +-- 23 lines: ElasticLoadBalancer:-----------<br>          - !GetAtt [ElbSecurityGroup, GroupId]<br>          Policies:<br>          - PolicyName: BackendPublicKeyPolicy<br>            PolicyType: PublicKeyPolicyType<br>            Attributes:                                                                <br>            - Name: PublicKey                                                          <br>              Value: |<br>                  MIIBIjANBgkqhkiG9w0BAQEFAAOCA...<br>                  8khN3k1IqQn5+Vy8rvVLOEIFhzwgc...     <br>                  IG5B1ErnLC3yc1FYwm8RhC9ISYT5T...<br>                  qgXZUrPVnT6XnibtsZiB4qiXnLly3...<br>                  XVulTlxQCaE/F/IftplHzCmdsXrnz...<br>                  2eIqgKJX+xU/2cwAqPiYHjc7HSWGR...<br>                  iQIDAQAB                 <br>          - PolicyName: BackendServerAuthenticationPolicy                              <br>            PolicyType: BackendServerAuthenticationPolicyType                          <br>            Attributes:                                                                <br>            - Name: PublicKeyPolicyName                                                <br>              Value: BackendPublicKeyPolicy                                            <br>            InstancePorts: [ &quot;8443&quot; ]</pre><p><em>After:</em></p><pre>+ +-- 23 lines: ElasticLoadBalancer:-----------<br>          - !GetAtt [ElbSecurityGroup, GroupId]                                        <br>          Policies:                                                                    <br>          - PolicyName: BackendPublicKeyPolicy                                         <br>            PolicyType: PublicKeyPolicyType                                            <br>            Attributes:                                                                <br>            - Name: PublicKey                                                          <br>              Value: !GetAtt [ ElbBackendCertificate, PublicKey ]                      <br>  -------------------------------------------<br>  -------------------------------------------<br>  -------------------------------------------<br>  -------------------------------------------<br>  -------------------------------------------<br>  -------------------------------------------<br>  -------------------------------------------              <br>          - PolicyName: BackendServerAuthenticationPolicy                              <br>            PolicyType: BackendServerAuthenticationPolicyType                          <br>            Attributes:                                                                <br>            - Name: PublicKeyPolicyName                                                <br>              Value: BackendPublicKeyPolicy                                            <br>            InstancePorts: [ &quot;8443&quot; ]</pre><p>Here is where the resource is actually used. In this case the Load Balancer resource has used the GetAtt function to lookup the PublicKey attribute created by the Lambda and used it in place of the hard coded value.</p><p>Later I’ve removed the hard coded private key information from the Launch configuration. This has been replaced with a script which pulls the private key and certificate from an S3 bucket and loads them into the correct locations.</p><h3>Still TODO</h3><p>This is a big improvement over the previous implementation because lots of sources of human error have been removed and it’s a lot easier to limit access to the relevant keys using IAM policies on the S3 bucket. There are a few extra improvements you should consider before using this in production. This includes:</p><ul><li>Renewing certificates before they expire (e.g. using a Lambda to scan the S3 bucket and update the CloudFormation template as required);</li><li>Load the certificates without burning down the server (e.g. using an agent on the server to pull the new certificate or maybe using AWS Code Deploy);</li><li>Encrypt the private key (e.g. using KMS so that it can only be decrypted on the server); and</li><li>Deploy an app more interesting than “Hello, World!”.</li></ul><h3>Takeaways</h3><p>Hopefully this has given you a bit of a taste for how you can use CloudFormation and Lambda together to acheive more complicated automation tasks. drie use similar techniques extensively as part of our service which takes care or routine maintenance like certificate management, firewalls and app scaling so that you have more time to tackle technical debt and new features.</p><p>If you’ve got questions about how this or drie work then please get in touch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3ab1d72a477" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E2E Encryption with Lambda, CloudFormation and ACM]]></title>
            <link>https://medium.com/drie/e2e-encryption-with-lambda-cloudformation-and-acm-2b8020d6c6a4?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b8020d6c6a4</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Thu, 08 Dec 2016 15:46:04 GMT</pubDate>
            <atom:updated>2017-01-06T11:14:28.817Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon Certificate Manager is a great (free) way to add SSL to your site but encrypting traffic all the way to you app is much harder.</p><p>This post is a detailed technical guide to one way of encrypting traffic all the way to your app. It also provides a good introduction to CloudFormation and Custom Resources using AWS’s Lambda service. You can follow along using <a href="https://github.com/bewt85/AwsCertificateManagerDemo">the code on GitHub</a>.</p><p><a href="https://medium.com/@benmadeit/e2e-encryption-with-lambda-cloudformation-and-acm-part-2-2-a3ab1d72a477">Part 2 is now available</a>. Skip on if you’re comfortable with CloudFormation and know how to configure certificates in Amazon Certificate Manager and Elastic Load Balancer.</p><h3>Why Amazon Certificate Manager</h3><p>AWS Cerificate Manager (ACM) is a great tool to create SSL certificates and deploy them in front of AWS based services using Amazon CloudFront or an Elastic Load Balancer (ELB). The nicest properties of ACM are:</p><ul><li>it’s really easy to create certificates (no faffing with signing requests etc);</li><li>it’s not possible to steal the private key (not even you get to see it) which makes it much easier to secure;</li><li>it’s renewed automatically by Amazon;</li><li>Amazon terminates SSL on their boxes (and they fix problems like Heartbleed before they’re even announced); and</li><li>it’s free!</li></ul><p>The challenge is to securely connect the load balancer to the instances actually serving the request. Fortunately ELBs support uploading a public key for a self-signed certificate, although this is somewhat non-trivial.</p><h3>Aims</h3><p>This repo leads you through the steps to apply end-to-end encryption for a collection of instances using AWS Certificate Manager (ACM), Elastic Load Balancer (ELB), AWS Lambda, CloudFormation and Amazon Simple Storage Service (S3). Eventually your architecture will look a bit like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LsluVnf3gMBY0zLsu3is6g.png" /></figure><p>Hopefully you should leave with an impression of the power of CloudFormation when used with Lambda and some ideas of how you might want to use it. It also gives you a bit of insight into some of the tools and techniques drie use to build our <a href="https://www.drie.co/">platform as a service</a>.</p><p>Don’t hesitate to get in touch if you have any questions or feedback on this demo or questions about how drie works behind the scenes.</p><h3>Step 1: A load balanced app</h3><p>We’ll start slowly with our <a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/cf_simple.yml">first template</a> which sets up a load balancer with an auto scaling group of servers behind it. There is no connection encryption in this example. Our aim here is to make you more comfortable with the CloudFormation interface and walk you through some of the key sections of a simple template.</p><p>To give it a go just download <a href="https://github.com/bewt85/AwsCertificateManagerDemo/blob/master/cf_simple.yml">the template</a> and log into the AWS console and select the CloudFormation service (or <a href="https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=simple">click this link</a>). These templates use a hard-coded AMI which only works in the Ireland region. Select the option to upload the CloudFormation template to S3 and browse to where you downloaded cf_simple.yml.</p><p>On the next screen, give your new stack a name (e.g. simple). The default values for the next screen are fine so click &quot;Next&quot; and then &quot;Create&quot; on the Review screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-7twPsZMx0ITjvzXp8h4-g.png" /></figure><p>You should see something like this. If you click on the “simple” stack, you should see the events as they happen, otherwise you might need to click the refresh icon in the top right. When the status changes to CREATE_COMPLETE you can click on the &quot;Outputs&quot; tab and copy the URL for the load balanced app. Note that the app isn&#39;t actually up and running yet; the servers have been created but they won&#39;t actually be serving the app for around 2 minutes.</p><p>In the meantime, let’s have a quick look at the template we used.</p><p>The template is written in <a href="http://yaml.org/">YAML</a> and can have a few top level keys. These are:</p><ul><li>AWSTemplateFormatVersion which always seems to be 2010-09-09;</li><li>Parameters which describes the inputs to the templates;</li><li>Resources which defines and configures the AWS resources we want; and</li><li>Outputs which are values we want to output from the template for reference or so that they can be consumed by other templates.</li></ul><p>You can also add a Description for the template and Mappings which can be used to lookup values using others (e.g. lookup the correct AMI for a region). In this example I&#39;ve not even used Parameters because we don&#39;t need any.</p><p>The template creates a few resources:</p><ul><li>AppSecurityGroup - a security group (Type: AWS::EC2::SecurityGroup) to configure firewall rules for the app instances;</li><li>AppScalingGroup - an auto scaling group (Type: AWS::AutoScaling::AutoScalingGroup) for the app instances;</li><li>AppLaunchConfig - some configuration (Type: AWS::AutoScaling::LaunchConfiguration) for each of the app instances (including the hello world source code);</li><li>ElbSecurityGroup - a security group (Type: AWS::EC2::SecurityGroup) to configure firewall rules for the load balancer; and</li><li>ElasticLoadBalancer - the load balancer (Type: AWS::ElasticLoadBalancing::LoadBalancer) itself.</li></ul><p>The documentation for each resource is pretty easy to find by searching for the Type (e.g. AWS::ElasticLoadBalancing::LoadBalancer). The two interesting ones here are the AppScalingGroup and the AppLaunchConfig.</p><pre>AppScalingGroup:<br>    Type: AWS::AutoScaling::AutoScalingGroup<br>    Properties:<br>        AvailabilityZones: !GetAZs<br>        LaunchConfigurationName: !Ref AppLaunchConfig<br>        DesiredCapacity: 1<br>        MinSize: 0<br>        MaxSize: 2<br>        LoadBalancerNames:<br>        - !Ref ElasticLoadBalancer<br>    UpdatePolicy:<br>        AutoScalingRollingUpdate:<br>            MinInstancesInService: 1<br>            MaxBatchSize: 1</pre><p>The first question you might have is “Why are you using an auto scaling group to load just one instance, why not just make an EC2 instance”? Well it’s a pretty convenient way of configuring which instances the load balancer should send traffic to; I can easily add health checks to recreate the instances if they die; and it makes it easier to add instances in the future. If I had started with an EC2 instance, these features would have been harder to add later. Autoscale groups are free so why not use them?</p><p>You might also wonder why I set DesiredCapacity to 1 and the MaxSize to 2. The reason is that the UpdatePolicycreates new servers before deleting old ones and CloudFormation gets upset if I don&#39;t set MaxSize to be N+1. If I was doing this properly, I would also use health checks to make sure that new instances were up and running before deleting old ones, but I&#39;m trying to keep the demo simple.</p><pre>AppLaunchConfig:<br>    Type: AWS::AutoScaling::LaunchConfiguration<br>    Properties:<br>        ImageId: ami-a4d44ed7<br>        SecurityGroups:<br>        - !GetAtt [AppSecurityGroup, GroupId]<br>        InstanceType: t2.nano<br>        UserData:<br>            !Base64 |<br>                #cloud-config<br>                ---<br>                packages:<br>                - git<br>                - python-pip<br>                write_files:<br>                - content: |<br>                    from flask import Flask<br>                    app = Flask(__name__)<br></pre><pre>                    @app.route(&quot;/&quot;)<br>                    def hello():<br>                        return &quot;Hello, World!&quot;</pre><pre>                    if __name__ == &quot;__main__&quot;:<br>                        app.run(port=8080)<br>                  path: /etc/hello.py<br>                  permissions: &#39;0644&#39;<br>                runcmd:<br>                - pip install flask gunicorn gevent<br>                - cd /etc/ &amp;&amp; gunicorn hello:app -b 0.0.0.0:8080 -k gevent</pre><p>The AppLaunchConfig shows you how to use functions to refer to attributes of other template resources, for example !GetAtt [AppSecurityGroup, GroupId] gets the details of the security group for these instances. I&#39;ve also used the UserData parameter to write a &quot;Hello, World!&quot; web service onto the instance, install the dependencies it needs and start it up at boot time. This is not how you should deploy your real applications: it&#39;s not very maintainable if you want your service to say something different; and there is nothing to restart the service if it falls over. Also it&#39;s running as the root user which is very bad practice.</p><p>By now the stack should have been deployed and we can check on the web service. Return to the CloudFormation console, click on the stack we just created, click on the “Outputs” tab and copy and paste the URL listed into the address bar. If you’ve been patient enough, you should be greeted by the words “Hello, World!”.</p><p>There’s more that’s dodgy about this template (like hardcoding the region, only supporting the AMI in that region, etc.) but I’ve made compromises to make the demo a bit easier. Now that we’re done with this demo, click on the stack, click Actions and delete the template. This will delete all of the resources we’ve used so far automatically (and stop you being billed for them).</p><h3>Step 2: SSL on the frontend</h3><p>The next step is to add SSL to connections to the load balancer. For this I will need a domain that I control (in this case “benmade.it”) and a certificate.</p><p>First I need to create a “Hosted Zone” in <a href="https://console.aws.amazon.com/route53/home?region=eu-west-1#hosted-zones:">Route 53</a>. Route 53 is Amazon’s DNS service which we will use to direct traffic to the correct load balancer. In my case I also used Route 53 to buy the “benmade.it” domain and the Hosted Zone was setup as part of this process. If you want to use a domain that you already control then have a look at the documentation for <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html">migrating a domain to Route 53</a> or the documentation for <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html">migrating a subdomain</a>.</p><p>When you have the Hosted Zone setup, make a note of its “Hosted Zone ID” which in my case was “Z2MFW6JEDJ91GG”.</p><p>Next we need to create a new frontend certificate in <a href="https://eu-west-1.console.aws.amazon.com/acm/home?region=eu-west-1#/">Amazon Certificate Manager</a> (ACM). To do this, just click “Request a certificate” and provide the domain you want to get a certificate for. In my case I picked a wildcard certificate for “*.demo.benmade.it” which I use for all of the demos.</p><p>ACM checks that you’re authorised to have this certificate by emailing the following:</p><ul><li><a href="/service/mailto:administrator@benmade.it">administrator@benmade.it</a></li><li><a href="/service/mailto:webmaster@benmade.it">webmaster@benmade.it</a></li><li><a href="/service/mailto:hostmaster@benmade.it">hostmaster@benmade.it</a></li><li><a href="/service/mailto:admin@benmade.it">admin@benmade.it</a></li><li><a href="/service/mailto:postmaster@benmade.it">postmaster@benmade.it</a></li></ul><p>When they get the email, they just need to click the link and follow the instructions on the screen. If your administrator doesn’t get this email (for example because these email addresses are not monitored) then you need to request the certificate using the API or the Amazon CLI. There are more details in the <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate.html">domain validation documentation</a>.</p><p>When your administrator has verified ownership of the domain, the status should change from “Pending validation” to “Issued”. Click on the certificate and make a note of its ARN.</p><p>It’s now time to create a new stack from the [cf_frontend_cert.yml](cf_frontend_cert.yml] template. In this case it will ask you for:</p><ul><li>the domain you app is served on (e.g. “frontend.demo.benmade.it”);</li><li>the ARN for the certificate you created in ACM which matches the domain (in my case “arn:aws:acm:eu-west-1:844611257690:certificate/6fdce02f-c3c9–4c0a-82fe-33dfa62d0acb”); and</li><li>the Hosted Zone ID in Route 53 which you use to administer that domain (in my case “Z2MFW6JEDJ91GG”).</li></ul><p>Notice that Route53HostedZoneId gives you a lookup for your Hosted Zones. That&#39;s because I set the type to AWS::Route53::HostedZone::Id. Similarly you can limit parameters to things like SSH keys or security groups (see the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html">parameter documentation</a> for more details).</p><pre>Route53RecordSet:<br>    Type: AWS::Route53::RecordSet<br>    Properties:<br>        HostedZoneId: !Ref Route53HostedZoneId<br>        Comment: !Ref Domain<br>        Name: !Join [ &quot;.&quot;, [ !Ref Domain, &quot;&quot;]]<br>        Type: CNAME<br>        TTL: 60<br>        ResourceRecords:<br>        - !GetAtt [ ElasticLoadBalancer, DNSName ]</pre><p>This template creates DNS entries which send traffic to your load balancer using a more sensible URL. The ELB has your SSL certificate installed on it by Amazon; this is used to terminate SSL and the traffic is then passed unencrypted to your backend instances.</p><p><em>Before:</em></p><pre>+ +--  3 lines: ElasticLoadBalancer:------<br>          AvailabilityZones: !GetAZs      <br>          CrossZone: true                 <br>          Listeners:                      <br>          - LoadBalancerPort: 80          <br>            InstancePort: 8080            <br>            Protocol: HTTP                <br>  ----------------------------------------<br>  ----------------------------------------<br>  ----------------------------------------<br>  ----------------------------------------<br>  ----------------------------------------<br>  ----------------------------------------<br>          HealthCheck:                    <br>              Target: &quot;TCP:8080&quot;          <br>              HealthyThreshold: &quot;3&quot;       <br>              UnhealthyThreshold: &quot;5&quot;     <br>              Interval: &quot;6&quot;               <br>              Timeout: &quot;5&quot;                <br>+ +--  2 lines: SecurityGroups:-----------</pre><p><em>After:</em></p><pre>+ +--  3 lines: ElasticLoadBalancer:---------------  <br>          AvailabilityZones: !GetAZs      <br>          CrossZone: true <br>          Listeners:<br>          - LoadBalancerPort: 80<br>            InstancePort: 8080<br>            Protocol: HTTP<br>          - LoadBalancerPort: 443<br>            InstancePort: 8080<br>            Protocol: HTTPS<br>            InstanceProtocol: HTTP        <br>            SSLCertificateId: !Ref SSLCertificate        <br>            PolicyNames: []<br>          HealthCheck:<br>              Target: &quot;TCP:8080&quot;          <br>              HealthyThreshold: &quot;3&quot;       <br>              UnhealthyThreshold: &quot;5&quot;<br>              Interval: &quot;6&quot;<br>              Timeout: &quot;5&quot;<br>+ +--  2 lines: SecurityGroups:--------------------</pre><p>The other key difference is this addition to the ElasticLoadBalancer resource. This tells it to take HTTPS traffic on port 443 (Protocol, LoadBalancerPort), use our certificate (SSLCertificateId) and pass that using HTTP to the instances on port 8080 (InstanceProtocol, InstancePort).</p><p>After a couple of minutes, the servers should be up and you should now be able to access you app on the domain you specified. For example, my app was accessible on <a href="http://frontend.demo.benmade.it/">http://frontend.demo.benmade.it</a> and <a href="https://frontend.demo.benmade.it/">https://frontend.demo.benmade.it</a></p><p>You can now tear down the stack to stop paying for the resources. Note that you’ll keep paying a small fee ($0.50 per month) for the Route 53 Hosted Zone until you delete that manually but we’ll want that for the latter demos.</p><h3>Next Time</h3><p>In <a href="https://medium.com/@benmadeit/e2e-encryption-with-lambda-cloudformation-and-acm-part-2-2-a3ab1d72a477">Part 2 of the tutorial</a>, we’ll move onto using backend certificates and how to generate these automatically using AWS Lambda.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b8020d6c6a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/e2e-encryption-with-lambda-cloudformation-and-acm-2b8020d6c6a4">E2E Encryption with Lambda, CloudFormation and ACM</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Examples Why Cyber Security isn’t a Cost Centre]]></title>
            <link>https://medium.com/drie/3-examples-why-cyber-security-isnt-a-cost-centre-c63ad4be4063?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/c63ad4be4063</guid>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Wed, 16 Nov 2016 12:40:17 GMT</pubDate>
            <atom:updated>2016-11-18T17:32:40.244Z</atom:updated>
            <content:encoded><![CDATA[<p><em>TL;DR the tools which make you more secure should also save or make you money.</em></p><p>I just came from a round table on Cyber Security which was organised by <a href="https://www.experis.co.uk/">Experis</a> and kicked off by an insightful talk by Talal Rajab from <a href="http://www.techuk.org/">techUK</a>. The key thought that I left with was that we should stop looking at security as a cost centre or a budget line controlled by a CISO; we need to think how the tools and techniques we use can drive revenue and change.</p><p>The result is that by talking differently and making friends in different parts of the organisation, we can get other people to chip into paying for our “security” projects.</p><h3>Logging and monitoring</h3><p>All organisations will have some sort of compromise. The key is to spotting it quickly so that you can fix it. Tools like <a href="https://www.splunk.com/">Splunk</a> are a great part of your toolkit to spot these sorts of threats.</p><p>They can also be used to great effect to understand how your customers use your service, spot trends and work out how you can sell more services to your existing customers and visitors.</p><p>If you want to buy something like Splunk, go speak to whoever holds your marketing budget and see if they want to chip in.</p><h3>Content Distribution Networks</h3><p>Services like <a href="https://www.cloudflare.com/">Cloudflare</a> offer a quick, low risk and cost effective way of mitigating the threat from Distributed Denial of Service (DDoS) attacks.</p><p>At the same time, their content distribution services makes your website more responsive for legitimate customers (which persuades them to stick around) and reduces the costs of running your service.</p><p>If you want DDoS protection, see who cares about converting site visitors into customers and see if they’ll chip in.</p><h3>Automation</h3><p>Automation with tools like <a href="https://www.ansible.com/">Ansible</a>, <a href="https://www.chef.io/">Chef</a> or <a href="https://puppet.com/">Puppet</a> are quick ways of enforcing security best practices on your own infrastructure. <a href="https://drie.co/">drie’s platform</a> is a way of outsourcing a lot of common infrastructure maintenance and security policy enforcement.</p><p>If you want to use an automation tool or a platform like drie, find a product owner who wants to ship features quicker or the person responsible for hiring new engineers. Automation more than pays for itself by focusing your existing development resources on your core business.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c63ad4be4063" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/3-examples-why-cyber-security-isnt-a-cost-centre-c63ad4be4063">3 Examples Why Cyber Security isn’t a Cost Centre</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PaaS (false) economics]]></title>
            <link>https://medium.com/drie/paas-false-economics-13f72d87b485?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/13f72d87b485</guid>
            <category><![CDATA[paas]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 20:07:39 GMT</pubDate>
            <atom:updated>2016-11-27T14:57:29.941Z</atom:updated>
            <content:encoded><![CDATA[<p>I heard today that a potential customer thought that <a href="https://drie.co/">our service</a> was a bit expensive; this was based on a comparison with the underlying cost of running an EC2 instance in the same region.</p><p>At time of writing, our service <a href="https://drie.co/pricing.html">costs £0.11 per hour</a> for a application instance with 1 GB of RAM. This compares with a cost of $0.013 (USD) for a similar on demand server. <em>[My faith is shaken and I start to wonder if this is such a good topic for a blog post]</em></p><p>The truth is that we don’t just run your servers, we run some other stuff to keep your apps healthy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8CgmLywmqlh-vOwhsamdTw.png" /></figure><p>For example, we use Lambdas to drive CloudFormation templates based on the contents of DynamoDB entries, but again, that isn’t all that expensive.</p><p>What begins to cost a bit more is some of the extra servers we run to support each app. At the moment, each app has a server standing by to receive instructions to re-build a new version of the app. That costs another $0.013 per hour. We also have a load balancer in front of all the web apps which costs $0.025 per hour (plus $0.008 per GB of data processed).</p><p>So you might be able to save 50% if you were running all this yourself, maybe a bit more if you ran lots of it.</p><p>The false economy comes in when you consider the main cost of building and maintaining this solution: developers.</p><p>The good folks over at <a href="https://www.glassdoor.co.uk/">glassdoor</a> tell me that the average “DevOps Engineer” salary in the UK is £42,850 (£47,192 in London). You then need to add a bit on for taxes and keeping your developer warm and suitably supplied with Haribo. That brings the cost of “running” a developer up to £50,000 per year (which ignores the cost of hiring them and the cost of hiring contractors to fill skills gaps). To provide 24/7 support (because at some point there will be an error), you need at least 3 of them (else they’ll burn out). We’ll say the team would cost £150,000 which ignores the fact that they’re all average and we’re not paying for any leadership / management resources (because the chances are they can do some other work for you on the side).</p><p>That team of three would have to support 340 servers running 24/7 between them before you broke even (assuming you’d save 5p per server per hour running your own).</p><p>Good engineers shouldn’t really be breaking even though; ideally they should be delivering 10x their salaries in business value (so that the business is viable). This is the opportunity cost of using your developers to work on plumbing rather than the thing that drives business value.</p><blockquote>The break even point: 3000+ app instances running 24/7</blockquote><p>In other words, you’d need to be running 3000+ application instances before it’s more cost effective to build your own platform.</p><p>This also excludes the time it will take you to build your own platform (potentially measured in years before you get to business as usual and certainly 6–12 months before you send it limited production traffic) and the cost of hiring the team to build it (at least 10+, maybe more). You could re-use an existing team but that only enhances the argument that there’s probably something better you could be using them for.</p><p>Anyhow, I’ve always found it hard to factor the cost of my time into making technical choices and this has certainly been interesting for me. I’m really looking forward to seeing how drie can deliver these sorts of benefits as we reach and exceed these sorts of scales.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13f72d87b485" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/paas-false-economics-13f72d87b485">PaaS (false) economics</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple Rules of thumb for 12 Factor Apps]]></title>
            <link>https://medium.com/drie/simple-rules-of-thumb-for-12-factor-apps-3eaa53af9c42?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eaa53af9c42</guid>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[paas]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 19:09:32 GMT</pubDate>
            <atom:updated>2016-11-18T17:22:24.723Z</atom:updated>
            <content:encoded><![CDATA[<p>Great platforms and tools like <a href="https://www.heroku.com/">Heroku</a>, <a href="http://dokku.viewdocs.io/dokku/">Dokku</a>, <a href="https://flynn.io/">Flynn</a> and <a href="https://drie.co/">drie</a> have converged on “<a href="https://12factor.net/">12 Factors apps</a>” as a common design pattern but new users still struggle to understand the changes they need to make and why it’s worth the effort. This aims to be a simpler guide for drie customers on how to design their apps; hopefully it’s useful to users of other platforms.</p><p>I’ll also describe some workarounds and tips that I’ve picked up from many happy years using Heroku and drie’s platforms.</p><h3>Why bother</h3><p>The deal is that if you stick to your side of the contract, we can deploy changes to your app without downtime, we can reliably roll back changes if they’re buggy, if a server fails (which they will do) we can replace them before your customers notice and we can categorically describe the “state” of your app at any given moment (which is a blessing for more security sensitive customers).</p><h3>Your side of the contact</h3><p>These are roughly prioritised based on frequency with which I see people get confused or make a mistake.</p><ol><li>Don’t write any data to disk (it’ll seem to randomly appear and disappear)</li><li>Assume the next customer’s request will hit a different server (but the one after that might hit this one again)</li><li>Load configuration from environment variables (especially secrets you don’t want to commit)</li><li>Store your code in a version control system (in drie’s case git)</li></ol><h3>No disk</h3><p>Don’t write anything to the local disk. Frameworks like <a href="https://www.drupal.org/">Drupal</a> and <a href="https://wordpress.org/">Wordpress</a> can’t help themselves and will just do this quietly in the background. Check your framework in advance, lots are OK. Workarounds include:</p><ul><li>Store user updates (e.g. new blog posts) in a database</li><li>Upload and serve assets like images from <a href="https://aws.amazon.com/s3">Amazon’s S3 service</a></li><li>Upload and serve user generated content from S3 (Wordpress has plugins which do this for you, check your framework for details)</li><li>Instead of Wordpress, you might want to consider a <a href="https://github.com/jekyll/jekyll">static generator like Jekyll</a> or you could use a dedicated service like <a href="https://wordpress.com/">Wordpress.com</a>. drie-like platforms are not perfect for everything!</li></ul><h3>Never again</h3><p>Assume you’ll never see the same server twice. For example, don’t store anything in memory on the server. That includes common things like creating a secret used to secure cookies.</p><ul><li>If you need a secret for your cookies (most sites with cookies do), create a secret on your development machine, use the drie CLI (or similar) to set it as an environment variable shared across all instances of your app and load the variable at startup</li><li>It’s a good idea to think through the implications if half your traffic hits one server and the rest went to another (and you couldn’t reliably send a customer’s traffic to one or the other). Even if you’re only running one copy of your app now, you might run more in the future or your platform of choice may temporarily scale you up so that they can move you from one host to another.</li><li>Use third party queues for asynchronous tasks (like <a href="https://aws.amazon.com/sqs">Amazon’s SQS</a>) and use background worker processes to pull and push from those queues.</li><li>If you need to do stuff asynchronously, store the result in your database and then any server can check if the job’s done</li></ul><h3>Configuration</h3><p>Some of your configuration might not be secret and you can commit that into a file (e.g. in JSON) and you can load it when the app starts up. More sensitive data (like keys and passwords) should be stored in environment variables.</p><ul><li>Check with your platform if there are any environment variables they set and expect you to use. A common one is “PORT” which is the port they expect you to serve your web app on</li><li>If you have different environments, create config files for each (e.g. config.dev.json, config.prod.json), and configure a variable to load the right one at runtime. For example:</li></ul><pre>config_file=open(“config.{}.json”.format(os.getenv(“ENV”, “default”)), ‘r’)</pre><ul><li>Put the secrets into environment variables. For example credentials used to connect to the database.</li><li>If your config file with secrets is short you may be able to load the entire thing into an environment variable using base64 encoding and then write it to disk when the app starts. This is not great practice but I confess that I’ve done it in the past.</li></ul><h3>Use Git</h3><p>Some people love Git, most people are a little scared of it (me too), some of us have had our arses saved by it more than once. It’s well worth learning the basics of committing versions, undoing changes and branching different versions to make it easier to compare versions of your work.</p><ul><li>It’s hard to beat <a href="https://try.github.io/">Github’s interactive tutorial</a></li><li>It sounds patronising but watching <a href="https://www.youtube.com/watch?v=3m7BgIvC-uQ">Git for Ages 4 and Up</a> was the point at which I suddenly started understanding Git and it’s had a similar effect for friends in the past</li></ul><h3>Is it worth it?</h3><p>Yes. Lots of awesome platforms only work if you build your app in this way. There’s a small learning curve but it becomes second nature once you crack it a couple of times.</p><p>If you’re stuck, it’s pretty quick for a more experienced user to have a look and debug which of their previous mistakes you’ve made. Drop me a line via Twitter and I’ll try and take a look.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eaa53af9c42" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/simple-rules-of-thumb-for-12-factor-apps-3eaa53af9c42">Simple Rules of thumb for 12 Factor Apps</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why use a hosted platform]]></title>
            <link>https://medium.com/drie/why-use-a-hosted-platform-dbc9072c176b?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbc9072c176b</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[paas]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 18:14:29 GMT</pubDate>
            <atom:updated>2016-11-18T17:32:05.426Z</atom:updated>
            <content:encoded><![CDATA[<p>The other day a mentor pointed out that I’m pitching drie completely back to front. When I talk to big organisations, security is not our selling point; these organisations are already secure, what they’re looking for is agility without sacrificing their security.</p><p>When I spoke to startups, I used to highlight how drie was a great tool which enabled them to build new features quickly, which again, is what they’re already doing. In their case building and maintaining secure services is not (necessarily) their passion and it’s unlikely to be their forte. Anything drie can do to take this off their plate is likely to be warmly received.</p><p>drie is actually about helping enterprises to work like startups and vice versa without compromising on agility or security.</p><h3>For enterprises</h3><p>Having spent a long time at HM Revenue &amp; Customs before the Digital revolution took place, it was pretty clear that the key killer of agility was risk management.</p><p>Risk comes in a couple of flavours: will the project be delivered on time (and what if it doesn’t work as planned); and will it be secure.</p><p>drie tackles delivery risks by making infrastructure provisioning and configuration dependable. Imagine never having to hear that a feature is blocked because the staging environment is being used to test an unrelated project; just spin up another in 15 minutes or less.</p><p>Enterprises also commonly introduce code freezes around their key events to allow time for testing and to reduce the likelihood of regressions. Tools like drie tackle this in a couple of ways. Firstly, we make it trivial to spin up new apps (and collections of apps) which makes it possible to quickly test for regressions as part of a Continuous Integration pipeline. The other virtue is that, if there is some sort of regression, it’s quick and reliable to roll that change back thereby mitigating the impact on customers.</p><p>Many enterprises are well setup to mitigate security risks but this commonly involves lots of manual rules, processes, checklists and, at some point, trust. By automating many of the common issues (like configuring firewalls and preventing administrators from logging into production servers) we create more time to focus on service specific risks. It also means that compliance processes which would traditionally have taken days or weeks can be turned into brief phone calls which only cover the differences since the last deployment.</p><h3>For startups and SMEs</h3><p>Most startups and SMEs cannot afford a dedicated security team and any time monitoring, patching and maintaining their existing services is time which is better spent on building out new features.</p><p>Platforms like drie do not mitigate every security threat but we take care of the ones which your developers have least experience with and free up time for them to focus on the ones which are more likely to affect your business.</p><p>Recruitment is also a key challenge for startups, especially in Ops roles. In this case, a hosted platform means that instead of hiring an Ops specialist today you can either hire another application developer or a sales specialist and bring someone on board once revenues are flowing.</p><h3>A better pitch</h3><p>Anyhow, that’s my revised pitch to both communities. Any ideas on how I could explain these options better would be great.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbc9072c176b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/why-use-a-hosted-platform-dbc9072c176b">Why use a hosted platform</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why use drie when I could use X?]]></title>
            <link>https://medium.com/drie/why-use-drie-when-i-could-use-x-c2b5c3d0cdb0?source=rss-7950cbd43f30------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2b5c3d0cdb0</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[paas]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Ben Taylor]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 15:56:29 GMT</pubDate>
            <atom:updated>2016-11-18T17:31:47.721Z</atom:updated>
            <content:encoded><![CDATA[<p>Part of my job is to speak to organisations, figure out if <a href="https://drie.co/">drie</a> is the right tool for them, and then to try and convince them of this. The three options I normally consider are rolling their own, installing something (e.g. <a href="https://kubernetes.io/">Kubernetes</a>, <a href="https://mesosphere.github.io/marathon">Mesos / Marathon</a>, <a href="https://www.cloudfoundry.org/">Cloud Foundry</a>) or buying from another provider (e.g. <a href="https://www.heroku.com/">Heroku</a>). This post is an attempt to document some of my thinking about the circumstances in which I promote <a href="https://drie.co/">drie</a>.</p><h3>Building your own platform</h3><p>Building platforms is hard; especially when you get into solving problems like scheduling and keeping servers up and healthy. I am especially wary of arguments that a DIY solution is a good way to save money; it’s a false economy because:</p><ol><li>it’ll definitely take two to five times longer than you think;</li><li>there’s a massive opportunity cost to spending valuable development resources on something other than the product which makes your business competitive; and</li><li>you’ll have to maintain the thing and there’s no way to control whether major bugs turn up while you’d rather have your team working on meeting another deadline.</li></ol><p>There are certainly shortcuts you can take, especially if you make use of AWS services like Elastic Beanstalk or Container Service or CloudFormation. If you really want to go down this route, my <a href="https://github.com/bewt85/CfTemplateLambdaDemo">demo repo on building a DIY PaaS</a> might be a good starting point.</p><h3>Ian Massingham on Twitter</h3><p>Don&#39;t build a platform unless you&#39;re building a platform 😀 https://t.co/mglYc4vS2a</p><p>Building a DIY solution might be a good idea if you’re spending so much money on infrastructure that you can squeeze out <a href="https://medium.com/@benmadeit/paas-false-economics-13f72d87b485">10 developers worth of savings</a> or you think Open Sourcing the tooling could be good for recruitment.</p><h3>Installing a platform</h3><p>This is a much better option for almost everyone but it’s still not perfect. Off the shelf tools like Kubernetes and Mesos / Marathon have had plenty of smart minds focused on fixing problems like scheduling but they still leave work to be done around other issues, mostly security related.</p><p>These tools solve significant problems well but you’re still left with a lot of work around setting up user management, controlling access to the servers, audit and, most trickily, how you control administrator access.</p><p>All these things eat up your development resources for way longer than you’d think. The <a href="https://governmentasaplatform.blog.gov.uk/">Government as a Platform team</a> at the (UK) Government Digital Service <a href="https://governmentasaplatform.blog.gov.uk/2016/09/29/first-service-paas">took over a year to get their first service live</a> using Cloud Foundry. The problem wasn’t installing the right packages on their servers, it was issues like trying to get the level of isolation they needed and the <a href="https://governmentasaplatform.blog.gov.uk/2016/10/18/developers-are-users">making a great developer experience</a>. It’s also worth noting that they had a well staffed team with awesome engineers with lots of experience of this sort of thing.</p><p>Not many teams can afford to distract a team of their best developers for 12–24 months to build a platform which <em>may</em> improve the performance of their other teams. That said, hosting your own platform like Kubernetes might still be your best option if you’re limited where you can run your services (e.g. by local data storage regulations).</p><h3>Using another hosted solution</h3><p>It is much more convenient to outsource the management and maintenance of your platform to a service like <a href="https://www.heroku.com/">Heroku</a> or <a href="https://pivotal.io/platform">Cloud Foundry</a>. As a long time fan of Heroku I understand why this is appealing.</p><p>That said, all sorts of organisations are not able to use these services because, again, security needs are not being met. In Heroku’s case this could be their <a href="https://devcenter.heroku.com/articles/pci-compatible-apps">lack of support for PCI compliant applications</a> or it could be because it remains hard to verify TLS connections to their database offerings.</p><p>That said, Heroku’s plugin market is very mature and that’s certainly an area which drie need to makeup ground. We’ve already introduced native support for a MySQL compatible database (AWS’s RDS Aurora) and we’re also created demos for integrating third party PostgreSQL and MongoDB databases.</p><h3>Why drie</h3><p>Having built a Platform as a Service while at HM Revenue &amp; Customs, it was pretty clear that there’s a need for tooling with the convenience of platforms like Heroku but which more security conscious organisations could make available to their teams. <a href="https://drie.co/">Our platform is now ready</a> and is being trialled by some pretty serious organisations.</p><p>There will always be teams who want to roll their own thing but my advice to them is to get started on a platform like drie this afternoon and see if you’ll get the benefits you expect before hiring 10–20 DevOps engineers and setting out on a 12–24 month project to build your own.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2b5c3d0cdb0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/drie/why-use-drie-when-i-could-use-x-c2b5c3d0cdb0">Why use drie when I could use X?</a> was originally published in <a href="https://medium.com/drie">drie</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>