Step 6: Deploy and Run PhotoApp - AWS OpsWorks

Step 6: Deploy and Run PhotoApp

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.

For this example, the application has also been implemented for you and is stored in a public GitHub repository. You just need to add the app to the stack, deploy it to the application servers, and run it.

To add the app to the stack and deploy it to the application servers
  1. Open the Apps page and choose Add an app.

  2. On the Add App page, do the following:

    • Set Name to PhotoApp.

    • Set App type to PHP.

    • Set Document root to web.

    • Set Repository type to Git.

    • Set Repository URL to git://github.com/awslabs/opsworks-demo-php-photo-share-app.git.

    • Choose Add App to accept the defaults for the other settings.

  3. On the Apps page, choose deploy in the PhotoApp app's Actions column.

  4. Accept the defaults and choose Deploy to deploy the app to the server.

To run PhotoApp, go to the Instances page and choose the PHP App Server instance's public IP address.

You should see the following user interface. Choose Add a Photo to store a photo on the Amazon S3 bucket and the metadata in the back-end data store.