简体   繁体   English

AWS EB CLI Django

[英]AWS EB CLI Django

I have successfully managed to deploy my Django project on AWS EB using EB CLI through PyCharm terminal local project on a Windows PC, however I would like to access the project via an EB instance on AWS console to edit some files individually instead of deploying the whole project each time.我已经成功地使用 EB CLI 通过 Windows PC 上的 PyCharm 终端本地项目成功地在 AWS EB 上部署了我的 Django 项目,但是我想通过 AWS 控制台上的 EB 实例访问该项目以单独编辑一些文件而不是部署整个每次项目。

The instance is Amazon Linux 2.实例是 Amazon Linux 2。

I connected to the EC2 instance of my project environment on the AWS EC2 instance connect and brings up the Elastic Beanstalk EC2 message, however I'm unable to find my project files within this console.我在 AWS EC2 实例连接上连接到我的项目环境的 EC2 实例并显示 Elastic Beanstalk EC2 消息,但是我无法在此控制台中找到我的项目文件。 Is there a way to access my already deployed project with AWS console, and if so how?有没有办法使用 AWS 控制台访问我已经部署的项目,如果可以,如何访问?

You can't see your files from the AWS console.您无法从 AWS 控制台查看您的文件。 Your files were deployed to a virtual machine of which filesystem can be viewed if you connect to the instance.您的文件已部署到虚拟机,如果您连接到实例,则可以查看该虚拟机的文件系统。

The recommended way to connect to an Elastic Beanstalk instance is to use eb ssh .连接到 Elastic Beanstalk 实例的推荐方法是使用eb ssh This will expose port 22 temporarily on the instance and will allow you to safely connect to it.这将在实例上临时公开端口 22,并允许您安全地连接到它。

eb ssh requires an SSH client to be installed, nowadays even Windows machines do come with SSH pre-installed, so this should not be a problem. eb ssh需要安装 SSH 客户端,现在即使是 Windows 机器也预装了 SSH,所以这应该不是问题。 It also requires to have an SSH key pair, which can be generated by running eb init --interactive and selecting yes when it asks for creating a key pair.它还需要有一个 SSH 密钥对,可以通过运行eb init --interactive并在要求创建密钥对时选择 yes 来生成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM