Smal teams, 5-7 people, reducing the number of communication paths
In the old monolithic model, you might have something that looks like this
This was certainly the case for Amazon where we had a big team of developers clobbering away at a big monolithic app, throwing it over the fence to QA, release and operations teams who shepherded it out to production… slowly and infrequently.
Going back to how we organize ourselves around microservices, we created the small DevOps teams to support them. Each team was now able to create software that is specific to the microservice they were responsible. Essentially we unbottlenecked the development and unbottlenecked the architecture, but we still had a release bottleneck.
The solution is self-service tools and automation….enabling each one of the DevOps teams to own and manage their own release process.
So, first things first - why do we need to accelerate innovation?
There is no historical precedent for the pace of change that we’re seeing, and it’s disrupting almost every industry.
Companies are becoming increasingly global, products and services are becoming completely digital
Customers expectations are getting higher as they gain the power of information and choiceBusinesses have to be agile to constantly adapt to this change, and continuously innovate in order to not be left behind.
Rapid innovation is changing what it means to be competitive
Competitors can rise from obscurity to dominance in a matter of months, leaving incumbents scrambling
The imperative is not just to innovate, but to innovate as quickly as possible.
<!> Leaders need to differentiate their current revenue-generating products through continual, incremental innovation.
At the same time, <!> they need to create differentiation by exploring and incubating innovation in new areas.
And that means that competing today requires true business agility.
The goal is to empower your teams to experiment, and take measured risks. Let your builders build.
At Amazon, we think of builders as people who reinvent customer experiences.
Launching a minimal viable product -or actually, a minimal valuable product - accelerates learning
MVPs can be rough and incomplete, but good enough to test assumptions.
Customers will tell you whether or not your MVP actually solves their problem, or enhances their lives,
And the process of experimenting, listening and iterating turns uncertainty into discovery about what will work.
OPTIONAL SLIDE
For AWS, giving developers operational responsibilities has greatly enhanced the quality of our services,
both from a customer and a technology point of view. At Amazon, our philosophy is you build it, you run it.
This brings developers into contact with the day-to-day operation of their software,
and it also brings them into day-to-day contact with the customer.
This customer feedback loop is essential for improving the quality of the service.
These three approaches satisfy all of our modern application development best practices.
These are the tenets that define serverless as an operational model (unless you know better ones):
No infrastructure to provision or manage (no servers to provision, operate, patch, etc.)
Automatically scales by unit of consumption (scales by unit of work/consumption rather than by server unit)
Pay for value billing model (if you value consistent throughput or execution duration you only pay for that unit rather than by server unit)
Built-in availability and fault tolerance (no need to architect for availability because it is built into the service)
When we say serverless, we mean it’s the removal of the undifferentiated heavy lifting that is server operations. This is an important distinction for customers because it allows customers to focus on the building of the application rather than the management and scaling of the infrastructure to support the application.
To reduce operational responsibility and development complexity
This is the focus of this session
OPTIONAL SLIDE
There are different approaches for IaC, but it is important to use one with declarative syntax, like CloudFormation or Terraform
How (Declarative) vs. What (Imperative)
Programing in many cases Imperative
SQL Select Declarative
Manage Serverless
Build CF
Deploy
Build and publish are the newest commands added to the SAM CLI
Logs
The AWS CDK is an infrastructure modeling framework that allows you to define your cloud resources using an imperative programming interface. The CDK is currently in developer preview. We look forward to community feedback and collaboration.
CDK is most useful to create high level structures, for example a VPC including your standard configurations for subnets, gateways, NAT, routing, security groups.
OPTIONAL: a live demo with the CDK with this sample code
Applets are YAML files that directly instantiate constructs, without writing any code.
To configure AWS CodePipeline pipelines with the CDK.
When you add a microservice, you need to create a new pipeline, similar to your other ones.
With CDK you can use an higher level class instead of copying and pasting lots of YAML code.
Constructs are the building blocks of AWS CDK applications. Constructs can have child constructs, which in turn can have child constructs, forming a hierarchical tree structure.
The AWS CDK includes two different levels of constructs:
CloudFormation Resource
These constructs are low-level constructs that provide a direct, one-to-one, mapping to an AWS CloudFormation resource, as listed in the AWS CloudFormation topic AWS Resource Types Reference.
All CloudFormation Resource members are found in the @aws-cdk/resources package.
AWS Construct Library
These constructs have been handwritten by AWS and come with convenient defaults and additional knowledge about the inner workings of the AWS resources they represent. In general, you will be able to express your intent without worrying about the details too much, and the correct resources will automatically be defined for you.
AWS Construct Library members are found in the @aws-cdk/NAMESPACE packages, where NAMESPACE is the short name for the associated service, such as SQS for the AWS Construct Library for the Amazon SQS service. See the Reference section for descriptions of the AWS CDK packages and constructs.
In the stack you can use the constructs you defines before, like the pipeline we created in the previous slide.
ECR is new
Strat from the code or from the artifact
https://docs.quay.io – Semaphore with Quay (Key)
https://jfrog.com/artifactory/
Installing AWS CLI and SAM CLI in the build environment
Need permissions to CodeDeploy to write into the bucket
artifacts:
type: zip #Only to tell this is a file (the outcome is yaml)
files:
- packaged.yaml
Talk about hooks!
This is my production
100% of the traffic goes to V1
PreTraffic hook – a Lambda function that need to call back CodeDeploy to move to the next stage (with the token of the deploy job)
Run performance test for 1 hour for example
Post Traffic hook when all customers are on the version
Usage:
Tag commit that the deployment was successful and it’s in production
DB Changes if needed
Cleanups
New from re:Invent
Same call back as in Lambda
OPTIONAL
Used to deploy once a week
Before they were releasing once per week at 2am on Monday, now they deploy 2 times per day (canary) during working hours.
Used to deploy once a week
Before they were releasing once per week at 2am on Monday, now they deploy 2 times per day (canary) during working hours.
Cost – This is all multi region (with replication)
Clone repo
Deploy before session (you only want to show the update in the demo)
Show that it works
Show code
Change the code to do something else
Commit
Show pipeline
Show CloudFormation events and wait for CodeDeploy…
Show canary/linear deployment on CodeDeploy for a couple of minutes
Try to get the result callint the API in the browser or via curl
https://t5sjvp3ew4.execute-api.eu-west-1.amazonaws.com/Prod/send/?user=danilop&message=Bonjour