Well-Architected Framework
Package applications
Application packaging creates deployable artifacts that ensure consistency across environments and simplify deployment processes. The packaging strategy you choose depends on your deployment target and operational requirements.
Container packaging
Containers provide a consistent runtime environment that works across different infrastructure. Use Docker to package your applications with their dependencies, creating portable images that can run anywhere containers are supported.
Container images should be built from minimal base images and follow security best practices. Include only the necessary dependencies and use multi-stage builds to reduce image size. Tag your images with semantic versions and build hashes for traceability.
Machine image packaging
For virtual machine deployments, package your application directly into the machine image using tools like Packer. This immutable infrastructure approach ensures that your application and its dependencies are baked into the image, eliminating configuration drift and deployment inconsistencies.
Machine images should include your application, runtime dependencies, and any required system configuration. Use automation to build these images consistently and test them before deployment.
Artifact packaging
For applications that don't require containers or machine images, create deployable artifacts like JAR files, Python wheels, or compiled binaries. Package these artifacts with their dependencies and configuration files to ensure they can be deployed consistently.
Store your packaged artifacts in a registry or artifact repository for version control and distribution. Use semantic versioning to track changes and enable rollback capabilities.
Next steps
In this section of Automate your workflows, you learned how to package applications for different deployment targets, including containers, machine images, and artifacts. Packaging is part of the Define and automate processes pillar.
Visit the following documents to learn more about the automation workflow:
- Automate deployments - Deploy your packaged applications
- Automate testing - Test your packaged applications before deployment