Deploy a scheduled workload on Fargate using AWS CDK

Click for: original source

The AWS Cloud Development Kit (CDK in short) is a relatively new framework for defining cloud Infrastructure as Code (IaC). CDK allows to easily define your cloud infrastructure by importing classes (resources) and instantiating objects. The resulting definition can be versioned in GIT, easily shared and used in command-line tools (for example in CI/CD pipelines). By Maurizio Bonani.

The underlying concept is that you can mutate your infrastructure through code, the same way you mutate any other application.

By using CDK you can fully leverage the ecosystem of your favorite programming language. This means that you can use your favorite code editor and get all the niceties such as syntax highlighting, type checking and auto-completion. Also with CDK, your infrastructure can be as testable as any other code you write.

Autor needed to run a periodic task to perform a basic ETL (Extract Transform Load) process on a MySQL database. The article describes the following steps to achieve it:

  • What is Fargate
  • Terminology
  • The code
  • Cluster
  • The definition
  • Containers
  • Service

That’s it. In this article we learned how to use CDK to provision a scheduled workload on AWS Fargate. Plenty of examples of the code which you can directly use with CDK to follow the article and deploy the solution. Perfect!

[Read More]

Tags app-development containers aws serverless