Devopser selected to join AWS Activate
Read More
Start developing immediately with pre-configured environments tailored for OpenAI integration. The AMI includes an OpenAI-enabled Flask application installed in the home directory. Simply add your Secret Names and region as variables in the .env file, initiate the Flask application, and quickly start building your own AI application.
The baked in demo application is integrated with AWS Secrets Manager out of the box, so your secrets are only pulled at runtime, ensuring security at all stages of the Software Development Lifecycle (SDLC). For a full list of the benefits of remote SSH development environments, click here.
This tutorial is designed to help you get started with AI application development using the DevOpser Flask AMI integrated with OpenAI, AWS Secrets Manager, and Redis. In about 20 minutes, you will learn how to launch an AI application on AWS, configure your environment securely, and run a Flask application that leverages the power of OpenAI.
For those seeking a streamlined deployment process, we offer an open-source, production-ready Terraform configuration: the OpenAIFlask Quickstart. This configuration automatically deploys your application across two EC2 instances in separate subnets, utilizing an Application Load Balancer with Route53 DNS and SSL support. While this serves as an efficient interim solution for launching your AI application, we're excited to announce our upcoming DevOpser Platform for AI Webhosting, slated for release in Q4 2024. This revolutionary platform will simplify deployment to a single click, abstracting the underlying Terraform complexity. You'll be able to bring your AI application to life effortlessly, as if by magic, without diving into the technical intricacies.
Click here to navigate to AWS Marketplace and subscribe to the AMI.
Host openAI_flask
HostName <Your_Public_IP>
User ec2-user
IdentityFile /path/to/your/key.pem
cd openaiflask
source /home/ec2-user/py3.11-venv/bin/activate
pip install -r app/requirements.txt
cp app/.env.example .env
.env
file and add your secret names and region to the file:
FLASK_APP=run
FLASK_ENV=development
OPENAI_SECRET_NAME=<your-secret-name>
FLASK_SECRET_NAME=<your-secret-name>
REDIS_URL=redis://localhost:6379/0
REGION=<your-region>
gunicorn run:app
localhost:8000
.You have successfully launched an AI application using the DevOpser Flask AMI, configured AWS Secrets Manager for secure API key storage, and set up a Python virtual environment for development. As you progress, consider implementing further security measures and exploring advanced configurations for production environments — we can help you with this with push button terraform deployments — just drop us a line at info@devopser.io. Happy coding!