• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Deploying Containerized Application on AWS LightSail with OpenRouter Integration

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,549
Баллы
155
AWS LightSail is a simple and cost-effective way to run containers, virtual servers, and managed services without complex configurations. It’s ideal for developers who want quick deployments with predictable pricing. In this guide, we’ll deploy CloudMart, a lightweight web application, on LightSail using a public container image. The app integrates with OpenRouter, a powerful API gateway for accessing multiple LLMs (Large Language Models), allowing intelligent AI interactions within your containerized environment. By setting environment variables for OpenRouter, you can easily connect your deployed application to advanced AI models.

Step 1: Log in to AWS LightSail

  • Navigate to the AWS LightSail service on the AWS Management Console.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 2: Create a New Container Service

  • Click on the "Create Container Service" button.
  • Keep the default Container service location selected zone.
  • Select the power Mi - Micro
  • Keep the scale at 1


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 3: Set Up the Deployment

  • Under the "Set up your first deployment" section, click on "Set up deployment".


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 4: Upload Your Container Image

  • Select "Specify a custom deployment".
  • Provide the container image name, tag, and registry as below:
  • Container name: cloudmart
  • Image:

public.ecr.aws/l4c0j8h9/acw-cloudmart-en:latest




Step 5: Configure Environment Variables

  • Create an account in openrouter.ai to get API Key.
  • Go to the Settings Menu and then API Keys to create a new API Key.
  • Go to LightSail console and select “Add environment variables”
  • In the environment variables section, add the key-value pairs based on the application needs.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



NAMEVALUE
OPENROUTER_API_KEY<your-api-key>
OPENROUTER_MODELdeepseek/deepseek-chat-v3-0324:free
STUDENT_NAME<your-name>


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 6: Assign a Public Endpoint

  • Select “Add open ports”
  • Add port 5001/HTTP to the open ports
  • Under the "Public Endpoint" section, select cloudmart to configure the container to expose the desired port (5001 for HTTP).


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 7: Identify your service

  • In the Identify your service section*,* provide your name (without spaces) so that LightSail can create a personalized URL for you to access your application: i.e: ishraque-cloudmart


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 8: Deploy the Container

  • Click "Create container service" to start the deployment process.
  • Wait for the container to be deployed and the service to become active.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Step 9: Test Your Deployment

  • Copy the public URL of your container service.
  • Open the URL in a web browser to verify that CloudMart is running successfully.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



This guide should help you get CloudMart up and running on AWS LightSail using environment variables for configuration.



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу