15.03.2023
9 min read

Getting AWS Ready for Your Developers

For IT professionals like architects and senior engineers, establishing a new AWS cloud environment is exciting. You are laying the foundations of your Infrastructure as a Service (IaaS) environment. How you do this will be impactful for years to come.

 Getting AWS Ready for Your Developers

Article by

David Christian

Getting your cloud stood up is like any other endeavor: it can be done with best practices in mind or by the seat of your pants. 

When the seat of the pants approach is taken for your greenfield project, you are setting yourself up for immediate technical debt. In some cases, the technical debt can be walked back with relative ease. In other cases, the debt will be extraordinarily expensive. In either scenario, fixing these issues will require you to pull resources away from other pressing issues, such as:

  • a full understanding and implementation of IAM management across roles, service roles, and users;
  • an incomplete control over encryption;
  • network connectivity and access controls that make the environment inherently less safe;
  • an incomplete control over the management of Lambdas, AMIs, and Containers.

The list above is by no means complete. Governing AWS is complex.

Secure Executive Sponsorship

The first question to be asked about any cloud project is, “Does it have executive sponsorship?”

Cloud projects may succeed and fail on their own merits, but they never succeed without executive sponsorship. This is true for both new and reimagined projects. In this instance, the executive’s role is to manage change and especially to work with non-IT teams to smooth over rough edges produced by the shift to the cloud.

During the first cloud project, IT billing must be shifted from primarily CapEx to OpEx. Getting over this hump is much lower than it was even, say, five years ago, but it is still an adjustment, and the teams rather than IT must make the adjustment. Executive sponsorship will help facilitate and guide this process.

Related to the CapEx/OpEx issue is the fact that the bills will now roll in every month. If you have simply rehosted the workload, until it is converted to cloud-native, chances are you will be paying substantially more for the same workload. Worse, you are double paying in many cases because the data center cannot be turned off until all of your targeted workloads have been migrated.

You will need executive “air cover” until the transformation is complete. Without that cover, the chances of project failure escalate geometrically.

Architect Correctly for the Cloud

To prevent the immediate manufacturing of technical debt, the AWS Well-Architected Framework is the first to stop on your cloud voyage.

Everyone from the C-Suite to the most junior developer should commit these pillars (high-level principles) to memory, then internalize them:

  • Operational Excellence
  • Security
  • Reliability
  • Performance Efficiency
  • Cost Optimization
  • Sustainability

If you keep these principles in mind as you refactor your workloads, you will be rewarded with a truly less expensive, more reliable, higher performing, and more secure cloud workload.

Account Structure

Account structure is the next thing to be considered. Operational excellence demands a master account be limited in the services it provides and limited in who can access it:

  • centralized billing
  • generation of new accounts
  • synchronizing accounts with a directory service
  • managing service control policies

The best practice that has evolved is that each workload gets a unique account for each of the environments in the Software Development Lifecycle (one environment per account):

  • Development
  • Test
  • UAT/PreProd
  • Production

We separate workloads into separate accounts for the following reasons:

  • billing segmentation: understanding the exact costs of workload in order of magnitude is easier. Each AWS account has an easy-to-understand account total. This may not be complete, as inevitably, there are shared resources, but this is simple and will be augmented by tagging strategies;
  • blast radius protection: an experiment in Development cannot impact Production or any other environment.

For account creation, you will use the AWS-provided Landing Zones. You will eventually want to make adjustments and additions to them, but they offer a good starting point.

Prerequisite Development Tools

Your DevOps team will want to align tooling with the Application Development Managers.  While that process is underway, you want to create a “Deployment” account in the account structure from which you employ your development tools. After some experimentation, you will want to standardize on one of the two major Infrastructure-as-Code (IaC) tools in the marketplace:

  • AWS provided: CloudFormation
  • Open source: TerraForm

CloudFormation is an IaC tool developed and supported by AWS. CloudFormation manages the state for you as an integrated service and will let you know when that state has drifted.  TerraForm does not do this automatically. The only way to get drift notification capability with TF is to run the “terraform plan” command at periodic intervals. 

CloudFormation’s most significant benefit is that if your developers have made a good-faith effort and are facing a problem, a call to AWS under the basic paid-for support can usually sort it out. 

TerraForm, on the whole, allows you to reuse code more easily. This is especially true if you add to it a tool like TerraGrunt. And this is a benefit if your IaC code base becomes large.

TerraForm supports much more than AWS, so if you need to integrate other technology providers into the TerraForm code, you can.

If you need support, there are a wealth of free resources and a highly responsive community.  For an additional fee, you may purchase support from HashiCorp, the creator of TerraForm.

If TerraForm is chosen, you will need a place to store the state files. Generally, this is done by using S3. Be sure to block concurrent access. TerraForm state files can often contain bits of security-sensitive data. Securing this data can be time-consuming and difficult when attempting to apply S3 policies to them. Be mindful of who can access which portions of the S3 state bucket.

Then you must decide (maybe you previously decided) on all the tools you need to support your IaC effort:

  • Infrastructure as Code storage:
    • AWS provided: CodeCommit
    • Open source: self-hosted Git
    • SaaS: GitHub, GitLab, BitBucket
  • CI/CD automation tools:
    • AWS provided: Code Pipeline
    • Open Source: self-hosted Jenkins
    • SaaS: GitLab, CloudBees, GitHub Actions, Bamboo, Harness, TeamCity

You will eventually find you need tools other than those listed here, but this is a good start.

The Account’s Network

Nearly every account will require a network. The role of the network will vary by the software architectures chosen.

Control Tower, in the master account, can create VPCs for you. That said, we still recommend you use a “custom” code for this. Control Tower, in our estimation, over-provisions VPCs for non-production networks. You have far less control over your subnet sizing and the number of subnets you can deploy.

If you have decided to use TerraForm, HashiCorp has developed a very flexible VPC module, fork it and use it. Then disable the Control Tower option for creating a VPC.

Network Access to VMs

For most of AWS's history, to directly access an EC2 in AWS, a DirectConnect or VPN connection was required.

That network connectivity may still be needed, especially if you are sharing data or services with on-premises data centers or other cloud providers. The modern method of connectivity is to rely on AWS CLI, a client plugin, and the Systems Service Manager (SSM).

Besides reducing the networking requirements, command-line access is logged in CloudWatch (a service for AWS service logging and monitoring, providing auditors with the exact commands executed from a shell) and CloudTrail (an AWS service for monitoring the AWS API invocations, in this case connecting to a host). SSH connectivity is over the AWS APIs and HTTPS.

We recommend that non-API network access, in other words attaching a security group and connecting to the EC2 directly SSH over your DirectConnect or VPN services, be considered a “break glass” event. This approach creates a number of ripple events that make your overall security much tighter than it would have otherwise been, eliminating direct use of SSH and RDP as a point of attack for bad actors.  

After the “break glass” event is over, do not forget to destroy that SSH/RDP security group.

Developer IAM Role

You will need to create an IAM role for your developers. AWS has some “AWS Managed” roles that will get you off to a good start. The permissions should be reviewed and adjusted to meet your organization’s “fit for purpose” requirements. The least privilege principle should be applied.

For example, if your team is not working on an Internet of Things (IoT) project, do you need to provide your developers with access to IoT services?

Another example: we generally minimize the network changes a developer can make.  Those changes should be made by an expert and by someone responsible for maintaining availability.

As the environment the developer is working in changes, so will the policies that define their access:

  • developers will have the broadest range of permissions; 
  • how you define access to Test will vary by organization, but generally, what seems to work is senior developers have broad access and junior developers have “read-only” access; 
  • UAT/PreProd and Prod are the most restrictive. Unless they need temporary access to debug, developers should have “read-only” privileges here.

You can always add the permissions later if conditions change.

Summing It Up

  • For a big-picture perspective on the implementation of an AWS cloud, you will need executive sponsorship to smooth over rough patches with other teams.
  • Before laying down a line of code, read the AWS Well-Architected Framework. It introduces you to the pillars that guide your workload and IaC deployments. The AWS Well-Architected Framework is not just for architects and engineers. Executive leadership should read it too, so they understand why individual decisions are being made. The pillars do not provide precise tasks or responsibility for completing those tasks; they provide context for requesting a task.
  • Functionally, you will need a Landing Zone; using the AWS-defined Landing Zone is a good starting point. You can refine your Landing Zones and their outputs as you move forward in your AWS maturity.
  • Direct network access to AWS using bastions, VPNs, and DirectConnect plus your internal network VPN to access an EC2 is no longer a requirement. Use AWS Systems Service Manager and the AWS CLI to control access to EC2. If you are sharing data or accessing on-premises services, then the use of a VPN or DirectConnect will certainly be needed.
  • Before you hand off to your application developers, you will want to set up the basic and commonly used tools and provide them with broad but limited development permissions. Then you will want to marry this with adequate but not overly generous IAM permission.

These are the minimum steps required to make your developers productive and enable them to hit the ground running. As time goes on, you will fine-tune these and other settings for governing your cloud.

Article by

David Christian

Subscribe to Our Newsletter

Subscribe now to get a monthly recap of our biggest news delivered to your inbox!