应用程序可以在 AWS Elastic Beanstalk 中创建文件吗?

Kap*_*hik 0 amazon-web-services amazon-elastic-beanstalk

我们的 Web 应用程序部署到 Elastic Beanstalk 实例,我想从代码中创建一个 text/csv 文件。

我需要获得创建文件的权限吗?还是默认启用?

我应该如何授予创建新文件的权限?

F_S*_*O_K 5

它默认启用。

在我的 Java 应用程序(在 EBS Tomcat 上运行)中,我使用此系统属性来标识要写入的临时目录:

// Get a temporary folder to write the attachment file in
final String dirPath = System.getProperty("java.io.tmpdir");
Run Code Online (Sandbox Code Playgroud)

如果我没记错的话,这只是给了我路径 /tmp