Categories
Technical

Setting up VPC peering

VPCs are a way of partitioning infrastructure in AWS to isolate them from communication with other infrastructure. They operate at the network level similar to VLANs and block all external communication by default. However, sometimes it is necessary to allow some inter-VPC communication. For example, if you have multiple AWS accounts that need to access […]

Categories
Technical

Cross-region deployments with CodePipeline

Last time, we looked at building a deployment pipeline using CodePipeline. Given the increasing number of countries that are implementing data residency policies, we now need to be able to deploy a copy of our application in a different region along with its database and connected services at the same time as in the main region […]

Categories
Technical

Triggering AWS ECS deployments via GitHub, CodePipeline and ECR

Deployments are a key part of running a web application, but most of the time, they are an afterthought when it comes to process and developer ease-of-use. However, using a number of AWS services, deployments can be made much easier, with most of the process automated. On the Accord ODR project, we use ECS to […]

Categories
Technical

Adding cron jobs with error recovery to AWS using Lambda, Step Functions and EventBridge

Scheduled jobs (or Cron jobs) are a standard part of web development. Whether you want to update comment counts every night or check for updates once a week, a scheduled job allows you to “set and forget”. There are a number of methods to implement scheduled jobs. Some rudimentary web apps check the schedule each […]

Categories
Technical

Allowing CloudFront to access load balancers through Security Groups

Security Groups are a best practice feature of VPCs in AWS that act similar to a firewall. They allow access to various resources such as EC2 instances, load balancers or RDS databases to be controlled to other resources or a set of IP addresses. For example, you may set up an EC2 instance to only […]

Categories
Technical

Setting up Athena to analyse CloudFront access logs

One of the best ways of working out who is how many people are visiting your site, see patterns of traffic and analyse them over time is to look at your access logs. Most web servers collect some form of access logs, mostly in a standard format such as the Common Log Format. As a CDN, […]

Categories
Technical

Virus scanning files in S3 and integrating with Rails

If you have an app that accepts file uploads, then either you’re aware of the potential risks, or you should be. With Accord ODR, we started by limiting the types of files that can be uploaded by users. This is the easy part: disallow executable files or anything else that can be scripted. This includes […]

Categories
Technical

CI using GitHub and AWS CodeBuild

Last time, we mentioned CI as one of things that we try to automate as much as possible. This time, we’ll go through more details about our CI setup and how it relates to our deployment pipeline. Setting up the CodeBuild project As well as being used as part of a CodePipeline, CodeBuild can also […]

Categories
Technical

Sending Slack alerts to approve CodePipeline deployments

At Resolver, we aim to automate as much of the boring technical jobs as possible, and that includes the whole continuous integration (CI) and deployment pipeline. We trigger these from GitHub, so a mere push or merge can kick-off our automated test suite or deploy to our staging environment for more automated and manual testing. […]

Categories
Technical

Running database migrations on deployment for Fargate containers

One of the tenets of modern framework-based web development is the management of your database state in code. Rather like infrastructure-as-code, it means there is an immutable history of the state of the application database at any point in time, which can be re-applied or rolled back as necessary. In addition, the desired state of […]