

# SUS 6 How do your organizational processes support your sustainability goals?
<a name="sus-06"></a>

Look for opportunities to reduce your sustainability impact by making changes to your development, test, and deployment practices. 

**Topics**
+ [SUS06-BP01 Adopt methods that can rapidly introduce sustainability improvements](sus_sus_dev_a2.md)
+ [SUS06-BP02 Keep your workload up-to-date](sus_sus_dev_a3.md)
+ [SUS06-BP03 Increase utilization of build environments](sus_sus_dev_a4.md)
+ [SUS06-BP04 Use managed device farms for testing](sus_sus_dev_a5.md)

# SUS06-BP01 Adopt methods that can rapidly introduce sustainability improvements
<a name="sus_sus_dev_a2"></a>

Adopt methods and processes to validate potential improvements, minimize testing costs, and deliver small improvements.

 **Common anti-patterns:** 
+  Reviewing your application for sustainability is a task done only once at the beginning of a project. 
+  Your workload has become stale, as the release process is too cumbersome to introduce minor changes for resource efficiency. 
+  You do not have mechanisms to improve your workload for sustainability. 

 **Benefits of establishing this best practice:** By establishing a process to introduce and track sustainability improvements, you will be able to continually adopt new features and capabilities, remove issues, and improve workload efficiency. 

 **Level of risk exposed if this best practice is not established:** Medium 

## Implementation guidance
<a name="implementation-guidance"></a>

 Test and validate potential sustainability improvements before deploying them to production. Account for the cost of testing when calculating potential future benefit of an improvement. Develop low cost testing methods to deliver small improvements. 

 **Implementation steps** 
+  Add requirements for sustainability improvement to your development backlog. 
+  Use an iterative [improvement process](https://docs.aws.amazon.com/wellarchitected/latest/sustainability-pillar/improvement-process.html) to identify, evaluate, prioritize, test, and deploy these improvements. 
+  Continually improve and streamline your development processes. As an example, [Automate your software delivery process using continuous integration and delivery (CI/CD) pipelines](https://aws.amazon.com/getting-started/hands-on/set-up-ci-cd-pipeline/) to test and deploy potential improvements to reduce the level of effort and limit errors caused by manual processes. 
+  Develop and test potential improvements using the minimum viable representative components to reduce the cost of testing. 
+  Continually assess the impact of improvements and make adjustment as needed. 

## Resources
<a name="resources"></a>

 **Related documents:** 
+  [AWS enables sustainability solutions](https://aws.amazon.com/sustainability/) 
+ [ Scalable agile development practices based on AWS CodeCommit](https://aws.amazon.com/blogs/devops/scalable-agile-development-practices-based-on-aws-codecommit/)

 **Related videos:** 
+ [ Delivering sustainable, high-performing architectures ](https://www.youtube.com/watch?v=FBc9hXQfat0)

 **Related examples:** 
+  [Well-Architected Lab - Turning cost & usage reports into efficiency reports](https://www.wellarchitectedlabs.com/sustainability/300_labs/300_cur_reports_as_efficiency_reports/) 

# SUS06-BP02 Keep your workload up-to-date
<a name="sus_sus_dev_a3"></a>

Keep your workload up-to-date to adopt efficient features, remove issues, and improve the overall efficiency of your workload. 

 **Common anti-patterns:** 
+ You assume your current architecture is static and will not be updated over time.
+  You do not have any systems or a regular cadence to evaluate if updated software and packages are compatible with your workload. 

 **Benefits of establishing this best practice:** By establishing a process to keep your workload up to date, you can adopt new features and capabilities, resolve issues, and improve workload efficiency.

 **Level of risk exposed if this best practice is not established:** Low 

## Implementation guidance
<a name="implementation-guidance"></a>

 Up to date operating systems, runtimes, middlewares, libraries, and applications can improve workload efficiency and make it easier to adopt more efficient technologies. Up to date software might also include features to measure the sustainability impact of your workload more accurately, as vendors deliver features to meet their own sustainability goals. Adopt a regular cadence to keep your workload up to date with the latest features and releases. 

 **Implementation steps** 
+  Define a process and a schedule to evaluate new features or instances for your workload. Take advantage of agility in the cloud to quickly test how new features can improve your workload to: 
  +  Reduce sustainability impacts. 
  +  Gain performance efficiencies. 
  +  Remove barriers for a planned improvement. 
  +  Improve your ability to measure and manage sustainability impacts. 
+  Inventory your workload software and architecture and identify components that need to be updated. 
  +  You can use [AWS Systems Manager Inventory](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-inventory.html) to collect operating system (OS), application, and instance metadata from your Amazon EC2 instances and quickly understand which instances are running the software and configurations required by your software policy and which instances need to be updated. 
+  Understand how to update the components of your workload.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/wellarchitected/2023-10-03/framework/sus_sus_dev_a3.html)
+  Use automation for the update process to reduce the level of effort to deploy new features and limit errors caused by manual processes. 
  +  You can use [CI/CD](https://aws.amazon.com/blogs/devops/complete-ci-cd-with-aws-codecommit-aws-codebuild-aws-codedeploy-and-aws-codepipeline/) to automatically update AMIs, container images, and other artifacts related to your cloud application. 
  +  You can use tools such as [AWS Systems Manager Patch Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-patch.html) to automate the process of system updates, and schedule the activity using [AWS Systems Manager Maintenance Windows](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-maintenance.html). 

## Resources
<a name="resources"></a>

 **Related documents:** 
+  [AWS Architecture Center](https://aws.amazon.com/architecture) 
+  [What's New with AWS](https://aws.amazon.com/new/?ref=wellarchitected&ref=wellarchitected) 
+  [AWS Developer Tools](https://aws.amazon.com/products/developer-tools/) 

 **Related examples:** 
+  [Well-Architected Labs - Inventory and Patch Management](https://wellarchitectedlabs.com/operational-excellence/100_labs/100_inventory_patch_management/) 
+  [Lab: AWS Systems Manager](https://mng.workshop.aws/ssm.html) 

# SUS06-BP03 Increase utilization of build environments
<a name="sus_sus_dev_a4"></a>

Increase the utilization of resources to develop, test, and build your workloads.

 **Common anti-patterns:** 
+  You manually provision or terminate your build environments. 
+  You keep your build environments running independent of test, build, or release activities (for example, running an environment outside of the working hours of your development team members). 
+  You over-provision resources for your build environments. 

 **Benefits of establishing this best practice:** By increasing the utilization of build environments, you can improve the overall efficiency of your cloud workload while allocating the resources to builders to develop, test, and build efficiently. 

 **Level of risk exposed if this best practice is not established:** Low 

## Implementation guidance
<a name="implementation-guidance"></a>

 Use automation and infrastructure-as-code to bring build environments up when needed and take them down when not used. A common pattern is to schedule periods of availability that coincide with the working hours of your development team members. Your test environments should closely resemble the production configuration. However, look for opportunities to use instance types with burst capacity, Amazon EC2 Spot Instances, automatic scaling database services, containers, and serverless technologies to align development and test capacity with use. Limit data volume to just meet the test requirements. If using production data in test, explore possibilities of sharing data from production and not moving data across. 

 **Implementation steps** 
+  Use infrastructure-as-code to provision your build environments. 
+  Use automation to manage the lifecycle of your development and test environments and maximize the efficiency of your build resources. 
+  Use strategies to maximize the utilization of development and test environments. 
  +  Use minimum viable representative environments to develop and test potential improvements. 
  +  Use serverless technologies if possible. 
  +  Use On-Demand Instances to supplement your developer devices. 
  +  Use instance types with burst capacity, Spot Instances, and other technologies to align build capacity with use. 
  +  Adopt native cloud services for secure instance shell access rather than deploying fleets of bastion hosts. 
  +  Automatically scale your build resources depending on your build jobs. 

## Resources
<a name="resources"></a>

 **Related documents:** 
+  [AWS Systems Manager Session Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html) 
+  [Amazon EC2 Burstable performance instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) 
+  [What is AWS CloudFormation?](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) 
+ [ What is AWS CodeBuild? ](https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html)
+ [ Instance Scheduler on AWS](https://aws.amazon.com/solutions/implementations/instance-scheduler-on-aws/)

 **Related videos:** 
+ [ Continuous Integration Best Practices ](https://www.youtube.com/watch?v=77HvSGyBVdU)

# SUS06-BP04 Use managed device farms for testing
<a name="sus_sus_dev_a5"></a>

Use managed device farms to efficiently test a new feature on a representative set of hardware.

 **Common anti-patterns:** 
+  You manually test and deploy your application on individual physical devices. 
+  You do not use app testing service to test and interact with your apps (for example, Android, iOS, and web apps) on real, physical devices. 

 **Benefits of establishing this best practice:** Using managed device farms for testing cloud-enabled applications provides a number of benefits: 
+  They include more efficient features to test application on wide range of devices. 
+  They eliminate the need for in-house infrastructure for testing. 
+  They offer diverse device types, including older and less popular hardware, which eliminates the need for unnecessary device upgrades. 

 **Level of risk exposed if this best practice is not established:** Low 

## Implementation guidance
<a name="implementation-guidance"></a>

Using Managed device farms can help you to streamline the testing process for new features on a representative set of hardware. Managed device farms offer diverse device types including older, less popular hardware, and avoid customer sustainability impact from unnecessary device upgrades.

 **Implementation steps** 
+  Define your testing requirements and plan (like test type, operating systems, and test schedule). 
  +  You can use [Amazon CloudWatch RUM](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM.html) to collect and analyze client-side data and shape your testing plan. 
+  Select the managed device farm that can support your testing requirements. For example, you can use [AWS Device Farm](https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html) to test and understand the impact of your changes on a representative set of hardware. 
+  Use continuous integration/continuous deployment (CI/CD) to schedule and run your tests. 
  + [ Integrating AWS Device Farm with your CI/CD pipeline to run cross-browser Selenium tests ](https://aws.amazon.com/blogs/devops/integrating-aws-device-farm-with-ci-cd-pipeline-to-run-cross-browser-selenium-tests/)
  + [ Building and testing iOS and iPadOS apps with AWS DevOps and mobile services ](https://aws.amazon.com/blogs/devops/building-and-testing-ios-and-ipados-apps-with-aws-devops-and-mobile-services/)
+  Continually review your testing results and make necessary improvements. 

## Resources
<a name="resources"></a>

 **Related documents:** 
+ [AWS Device Farm device list ](https://awsdevicefarm.info/)
+ [ Viewing the CloudWatch RUM dashboard ](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-view-data.html)

 **Related examples:** 
+ [AWS Device Farm Sample App for Android ](https://github.com/aws-samples/aws-device-farm-sample-app-for-android)
+ [AWS Device Farm Sample App for iOS ](https://github.com/aws-samples/aws-device-farm-sample-app-for-ios)
+ [ Appium Web tests for AWS Device Farm](https://github.com/aws-samples/aws-device-farm-sample-web-app-using-appium-python)

 **Related videos:** 
+ [ Optimize applications through end user insights with Amazon CloudWatch RUM ](https://www.youtube.com/watch?v=NMaeujY9A9Y)