【发布时间】:2021-12-01 11:16:17
【问题描述】:
我在 Elastic Beanstalk 上托管一个 .NET 后端应用程序。我做了一个像这样的配置文件:
Resources:
AWSEBAutoScalingGroup:
Metadata:
AWS::CloudFormation::Authentication:
S3Auth:
type: "s3"
buckets: ["my-bucket"]
roleName:
"Fn::GetOptionSetting":
Namespace: "aws:autoscaling:launchconfiguration"
OptionName: "IamInstanceProfile"
DefaultValue: "aws-elasticbeanstalk-ec2-role"
files:
# Private key
"/var/app/current/file":
mode: "000400"
owner: root
group: root
authentication: "S3Auth"
source: https://my-url/file
这似乎可行,但是,当我尝试仅使用file(我也尝试过./file)作为路径名来访问.NET 中的文件时,我收到File not found 错误。它说我的当前目录是var/app/current。
我最终不确定如何在 ec2 中查看 EB 实例的文件,甚至查看它是否被复制,或者在不引发异常的情况下失败。如果它确实复制了,它被放在哪里......或者我只是访问错误的文件?
【问题讨论】:
标签: .net amazon-web-services amazon-ec2 amazon-elastic-beanstalk