From the course: AWS Certified Developer - Associate (DVA-C02) Cert Prep

AWS deployment services

- [Instructor] There are different ways to build, test, and deploy your applications to your development or production environments. Back in the day, we used to just copy a ZIP file, a Word file, or the binary files in the web apps directory of our web servers. Then, we have to manually configure and start our Apache, Nginx, and IBM Web Services servers to reflect the changes. This process is called a manual deployment, and it's prone to a lot of human errors. There are a lot of moving parts that we have to do by hand, which may take several hours to complete. Worse, provisioning the required virtual web server or dedicated database cluster will take you weeks or even months to accomplish, due to lack of automation. Good thing that nowadays, you can do your deployment in the blink of an eye through the various deployment tools available at your disposal. AWS offers a number of services that provide deployment and management capabilities for one or more aspects of your application lifecycle. These services enable organizations to build and deliver applications faster than their traditional CI/CD workflow. You and your team don't have to spend a lot of time manually provisioning, configuring, updating, monitoring, or securing your AWS resources anymore. These laborious tasks can be programmed into code and easily automated with the different deployment services available in AWS. Some of these services use the concept of Infrastructure as Code, or IaC. And IaC is the process of managing and provisioning your servers, databases, CDNs, and other resources through machine-readable definition files. Simply put, you only need to provide a text-based definition file that will automatically provision the required resources for your application in just one click of a button. The advent of cloud computing enables companies to deploy all their workloads entirely in the cloud. They also have the option to run a hybrid cloud architecture in which they utilize both their physical on-premises resources and cloud services in AWS at the same time. There's even an option now to do a multi-cloud deployment where you deploy your infrastructure to AWS, Azure, Google Cloud, and other public cloud providers simultaneously. You can run both your multi-tier applications and Kubernetes or dark container cluster almost anywhere, whether it be on the cloud, on-premises, on multiple public clouds, or a combination of all three. Let's discover the different deployment services in this lesson. These services have the capability to provision, configure, deploy, scale, and monitor your cloud architecture without any manual intervention on your part. They are AWS CloudFormation, AWS Elastic Beanstalk, AWS CodeDeploy, Amazon ECS Anywhere, Amazon EKS Anywhere, AWS OpsWorks, AWS Proton, and many more. AWS CloudFormation is a service that enables you to provision and manage your AWS resources using a custom code template. You can create a custom template in YAML or JSON format that defines the AWS resources that you require, like Amazon EC2 instances, Amazon FSx file systems, Amazon Aurora databases, CloudFront distributions, or any other resource. And the AWS CloudFormation service can deploy all of these automatically for you. AWS CloudFormation also comes with a graphic tool called the CloudFormation Designer. This is a drag-and-drop online tool for creating, viewing, and modifying your AWS CloudFormation templates. CloudFormation is the primary Infrastructure-as-Code service in AWS. It works like any other IaC tools in the market, like Terraform, Ansible, Chef, and Puppet. The key difference, however, is the additional features that it provides, which are fully compatible with the AWS Cloud. A CloudFormation template deploys your cloud infrastructure resources in a group called a stack. This stack can represent your entire cloud architecture, or just a subset. If you have a large multi-tier architecture, you can create multiple templates to represent the different tiers of your enterprise application suite. You can create a CloudFormation template for your presentation layer stack, another template for your application layer stack, and one more for your data layer stack. You can bundle your multiple stacks together into something called a nested stack. In CloudFormation, you can have a root stack with a hierarchy of nested stacks under it. This will effectively make the modules of your infrastructure code to be loosely coupled with each other, which makes the management of each individual stack much easier. Your application layer stack will only contain EC2, EKS, ECS, and other compute resources, while a data layer stack will have RDS, Aurora, DocumentDB, Amazon Neptune, Amazon Timestream, or any database services. Any change in one of the nested stack won't adversely affect the other stack. Aside from provisioning your resources, Amazon CloudFormation allows you to change, modify, or scale your services that are already deployed in your AWS account. It even has a dry run mode to check your upcoming changes before they're deployed in your cloud environment. This feature is called a change set. Essentially, a change set allows you to see how your changes might impact your running resources before finally implementing them. Say you want to change the name of your Amazon Aurora serverless database. You can create a change set in CloudFormation that'll create a new Aurora database and delete the old one. Of course, you'll lose the data in the old database unless you've taken a DB snapshot for backup. The change set will show you the upcoming change so you can plan accordingly before you update your stack. A CloudFormation stack is usually mapped in a single AWS account only, so if you're running your applications in two or more AWS accounts, you can use stacksets. A stackset extends the capability of CloudFormation stacks by enabling you to create, update, or delete stacks across multiple accounts in AWS regions in a single operation. You can select an AWS Secure account in your AWS organization and then choose a particular CloudFormation template for your stackset. This template will be the basis for provisioning the stacks into your selected target accounts. The stack change set, stackset, and the graphical designer tool are the base feature of the AWS CloudFormation service. There are different services in AWS that extend the capabilities in CloudFormation, namely, the AWS Cloud Development Kit and AWS Serverless Application Model. The AWS Cloud Development Kit, or AWS CDK for short, is an open-source software development kit for Amazon Web Services. You can use this to programmatically model your AWS infrastructure using TypeScript, Python, Java, .NET, or any other programming languages that you prefer. The AWS Serverless Application Model Service, or AWS SAM, is an open-source framework that simplifies the development of your serverless applications on AWS. This is commonly used if your cloud stack is using AWS Lambda, Amazon DynamoDB, Amazon API Gateway, and other serverless services. AWS SAM can also have a SAM template that's essentially just an extension of the AWS CloudFormation template. A SAM template has some additional components that make it easier for you to work with serverless services in AWS. Your apps can be stored in the AWS Serverless Application Repository. This repository service makes it easy for developers and companies to deploy, manage, and share your serverless applications in AWS and to the greater public. You can easily publish your serverless apps and share them with the community at large or privately within your organization. AWS Elastic Beanstalk is a match platform that allows you to upload your application code in AWS and provision the required cloud environment easily. You only need to upload your application package orchestrated in Java, .NET, PHP, Node.js, Python, Ruby, Go, or Docker, and then Elastic Beanstalk will deploy the necessary sources to run your application. You can either run a web server environment or a worker environment. A web server environment runs a static website, a web app, or a web API that serves HTTP requests, while a worker environment, on the other hand, runs a worker application that processes long-running workloads on demand. The latter also performs tasks on a schedule that you define and can be integrated with the Amazon SQS queue. The AWS Elastic Beanstalk service also uses a configuration file like CloudFormation to automatically deploy and configure your applications. These configuration files in Elastic Beanstalk are stored in the .ebextensions folder. AWS CodeDeploy is a fully-managed deployment service that automates your application deployments in AWS. You can deploy your applications to Amazon EC2 instances, Amazon ECS clusters, AWS Lambda functions, and other computing services in AWS. You can even use this to deploy your application to the servers located on your on-premises network. This service is different from AWS CloudFormation, AWS SAM, and Elastic Beanstalk, since you can only deploy your applications to existing compute resources. AWS CodeDeploy does not create AWS resources on your behalf, and is intended for application deployments only. Amazon ECS is a fully-managed container orchestration service that supports Docker containers. This orchestration service allows you to easily run containerized applications on a managed cluster that you can control. Basically, container orchestration is an automation tool that reduces the operational effort needed to run your containerized workloads and services. Amazon ECS can automatically orchestrate or control the manual tasks of provisioning, deploying, scaling, networking, and many other tasks, so you don't have to. When you create an Amazon ECS cluster, you can choose whether the compute resources will be deployed or launched in your own VPC, in AWS Fargate, or externally via Amazon ECS Anywhere. A cluster launch in a VPC uses Amazon EC2 instances that are orchestrated and controlled by Amazon ECS. You can use the Amazon CloudWatch Container Insights to monitor your container workloads. If a launch type is AWS Fargate, then your cluster will be serverless and the computing resources will be fully managed by AWS. Using AWS Fargate can significantly reduce

Contents