AWS Building Blocks: Developer Tools
If you think of the Amazon Web Services (AWS) cloud as just another infrastructure on which to run your web apps and services, then this blog post is for you. AWS has gone far beyond its original Infrastructure as a Service (IaaS) model and now offers a rich selection of tools and services for building and deploying cloud-based mobile and web apps.
A quick glance at the AWS cloud products page is sufficient to understand that AWS supports just about every possible app requirement, from databases (SQL and NoSQL) to Internet of Things, blockchain, media services, and security/identity/compliance.
In addition to these app building blocks, AWS offers a full set of developer tools for continuous integration/continuous delivery (CI/CD) processes, as well as for today’s advanced app approaches—mobile, microservices, and serverless. In this blog post, we describe the key AWS tools and services for developers.
AWS offers an end-to-end CI/CD stack comprised of the following four services:
AWS CodeCommit hosts private GitHub repositories in a fully managed and secure source control service that supports all Git commands (commit, branch, merge, and more) and Git tools. AWS CodeCommit scales automatically as project needs grow, while its redundant architecture makes sure that repositories are highly available and durable. Developers also benefit from low latency since AWS CodeCommit keeps repositories close to build, staging, and production environments. In addition, AWS CodeCommit upholds the highest security requirements by encrypting files in transit and at rest, as well as providing user-specific access through AWS Identity and Access Management (IAM).
AWS CodeCommit is free for the first five active users, after which the fee is $1/month for each additional active user. An active user is an AWS identity that accesses AWS CodeCommit repositories that month through Git requests, AWS Management Console, AWS CLI, or AWS SDKs. Each active user gets unlimited repositories, 10 GB-month of storage, and 2,000 Git requests/month. Storage or requests above these limits are charged at $0.06/GB-month and $0.001/Git request.
AWS CodeBuild lets you easily compile source code, run tests, and produce ready-to-deploy software packages in a fully managed CI service. AWS CodeBuild scales build servers continuously and automatically. It also processes multiple builds concurrently, eliminating build queues. Although AWS CodeBuild provides prepackaged build tools and runtimes, you can create customized build environments using your own tools and workflows.
As always, AWS CodeBuild is highly secure. Build artifacts are encrypted with customer-specific keys that you manage through the AWS Key Management Service (KMS). AWS CodeBuild is also integrated with IAM, allowing you to granularly control user permissions for build projects.
AWS CodeBuild’s pricing model is pay-as-you-go, based solely on the compute resources you use during the build process. Charges are for the Build Duration, which is calculated in minutes (rounded up to the nearest minute). The clock starts ticking when you submit a build and stops when the build is terminated.
The charges vary according to the AWS CodeBuild compute instance type that you choose: small (3GB memory, 2 vCPUs); medium (7GB memory, 4 vCPUs); or large (15GB memory, 8 vCPUs). The charges also vary depending on whether you’re using a Linux or a Windows build server. Thus, for example, the charge for a medium instance on a Linux server is $0.010/build minute and $0.018 on a Windows server.
The next link in the AWS CI/CD stack is AWS CodeDeploy, which automatically deploys software packages to various AWS compute services (Amazon EC2, AWS Fargate, AWS Lambda) and to your on-premises servers. Platform and language agnostic, AWS CodeDeploy works with any application and can integrate with existing software release processes and toolchains, such as AWS CodePipeline (see below), GitHub, or Jenkins.
The key benefits of AWS CodeDeploy are:
- Fully automated, reliable, rapid, and consistent deployments across development, test, staging, and production environments.
- Seamlessly scales as needed as infrastructure grows.
- Minimized downtime during deployment with incremental changes, tracking of application health per configurable rules, and easy rollbacks.
- Centralized control and tracking via the AWS Management Console or AWS CLI, with detailed reports on when and where each application revision was deployed.
AWS CodeDeploy is free of charge when deploying to Amazon EC2 or AWS Lambda. When deploying to on-premises servers, the charge is $0.02/on-premises instance update, with no charge for instances that are skipped during the deployment. You will also pay for other AWS resources that you may use in conjunction with AWS CodeDeploy to store and run the application, such as Amazon S3 buckets.
AWS CodePipeline automates release pipelines for reliable continuous delivery of features and updates. At each code change, AWS CodePipeline automatically carries out the build, test, and deploy phases according to software release workflows that you model via the service’s GUI console, the AWS CLI, AWS CloudFormation actions, or the AWS SDKs. You can use prebuilt plugins or custom plugins at any step of the release process.
If any step fails during the release process, the workflow is stopped and an error notification is issued. You can also introduce manual approval points throughout the release workflow. And as with all AWS services, AWS CodePipeline is integrated with IAM so that you can control who can make changes to or initiate release workflows.
AWS CodePipeline costs $1.00/active pipeline per month. An active pipeline is a pipeline that is more than 30 days old and has had at least one code change run through it during the month. Other charges may be incurred for storing and accessing pipeline artifacts in Amazon S3 buckets or for triggering actions from other AWS and third-party services connected to your pipeline.
AWS CodeStar works with all of the Code[x] services described above to provide a unified interface and dashboard for managing application development projects. AWS CodeStar encourages team collaboration and rapid development-build-deployment cycles in order to deliver features, updates, and fixes as quickly as possible. Using AWS CodeStar is free of charge, with costs incurred only for AWS resources used to develop and run the application.
AWS Cloud9 IDE
If you also want to write your code in the cloud, there’s the AWS Cloud9 integrated development environment (IDE). With a built-in code editor, debugger, and terminal, all you need to write, run, and debug code in AWS Cloud9 is a browser connected to the Internet. AWS Cloud9 lets you quickly share your development environment for real-time pair programming.
AWS Cloud9 is also tightly integrated with the AWS resources and services you may want to use in your app, including preconfigured support for serverless SDKs, libraries, and plugins.
AWS Cloud9 is free of charge. You pay only for compute and storage resources that you use to store and run your code, such as EC2 instances or EBS volumes.
Special Use Cases
In this section, we briefly cover some of the more specialized development use cases that AWS supports.
Amazon Corretto is a multiplatform production-ready distribution of the Open Java Development Kit (OpenJDK). Amazon runs Corretto on thousands of its own production services and commits to long-term support, including performance improvements and security fixes.
Amazon Corretto is free of charge, certified to the Java SE standard, and lets you develop and run Java apps on multiple operating systems, including Linux, Windows, and macOS.
AWS provides a number of services to support the development, testing, and running of mobile apps:
- AWS Amplify automates the development and release process for both the frontends (iOS, Android, React Native, etc.) and backends (server-side authentication, analytics, offline data sync, etc.) of your mobile app. The AWS Amplify Console incurs a build & deploy cost of $0.001/build minute and a hosting cost of $0.023/GB stored per month and $0.15/GB served.
- AWS Device Farm lets you test your web apps on many devices concurrently or reproduce issues on a particular device in real time. You can either use the shared fleet of 2,500+ devices or a private lab of dedicated devices in the cloud. Pricing is either pay-as-you-go ($0.17/device minute) or unlimited testing (starting at $250/month). Private dedicated device testing starts at $200/month.
- AWS AppSync is a serverless data management and manipulation backend for mobile, web, and enterprise apps. AWS AppSync charges are $4 per 1 million Query and Data Modification Operations and $2 per 1 million Real-time Updates (plus $0.08 per 1 million minutes of connection to the AWS AppSync service).
Microservices, Serverless, and Containers
Today, many cloud-native apps have highly distributed architectures based on microservice, serverless, and container approaches that free up developers from infrastructure concerns. AWS provides extensive support for these approaches:
- AWS Lambda is the leading Function as a Service framework, letting you run code without provisioning or scaling servers, and paying only for the compute time consumed.
- AWS provides an array of microservices from which distributed apps can be built, such as Amazon Cognito for credentials and Amazon Pinpoint for targeted messages. In addition, Amazon S3 solves the data availability and durability issues of stateless serverless apps.
- AWS X-Ray lets you monitor and troubleshoot distributed apps across all of their components.
- Microservice-based apps typically use API calls and messages to communicate across the service mesh. Thus, both Amazon API Gateway and Amazon Simple Queue Service (SQS) are particularly relevant to these apps.
- Last, but certainly not least, Amazon Elastic Container Service (ECS) and Amazon Elastic Container Registry (ECR) provide highly scalable and high performing orchestration and registry services for Docker containers.
AWS provides a comprehensive suite of tools and frameworks to support development and operations teams throughout the application lifecycle—from source control (AWS CodeCommit) to code compilation and testing (AWS CodeBuild), deployment into production (AWS CodeDeploy), and automated CI/CD workflows (AWS CodePipeline).
AWS Codestar pulls all of these services together into a single application project management interface that gives all stakeholders full visibility into project tasks and status. And AWS even provides an entirely cloud-based IDE (AWS Cloud9) that promotes real-time development collaboration.
There are many excellent tutorials that can shorten the learning curve for developers adopting the AWS application development and deployment stack. Some examples include:
- AWS Developer Services for CI/CD, Cloud Academy
- DevOps Engineering on AWS, Global Knowledge
- AWS Developer: Building on AWS, edX
- Build a Serverless Application with AWS CodeStar and AWS Cloud9, AWS
As an AWS Advanced Consulting Partner, Media Temple can help you get the most from your AWS cloud. Reach out anytime.