Using a Back-end Data Store
Important
AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.
Application server stacks commonly include a database server to provide a back-end data
store. AWS OpsWorks Stacks provides integrated support for MySQL servers through the MySQL
layer and for several types of database servers through the Amazon Relational Database Service (Amazon RDS)
layer. However, you can easily customize a stack to have the application servers
use other database servers such as Amazon DynamoDB or MongoDB. This topic describes the basic
procedure for connecting an application server to an AWS database server. It uses the stack
and application from Getting Started with Chef 11 Linux Stacks to show
how to manually connect a PHP application server to an RDS database. Although the example is
based on a Linux stack, the basic principles also apply to Windows stacks. For an example of
how to incorporate a MongoDB database server into a stack, see Deploying
MongoDB with OpsWorks
Note
This topic uses Amazon RDS as a convenient example. However, if you want to use an Amazon RDS database with your stack, it's much easier to use an Amazon RDS layer.