Amazon Elastic Beanstalk具有对Amazon S3的文件访问权限
我的Amazon Elastic Beanstalk和Amazon S3安装程序有问题。 从EB实例我想加载一个文件与节点( fs.readFileSync ),我试了fs.readFileSync的configuration – 但他们没有工作,所以你是我最后的希望。 这是我的.ebextensions/key.config : Resources: AWSEBAutoScalingGroup: Metadata: AWS::CloudFormation::Authentication: S3Auth: type: S3 buckets: mybucket roleName: aws-elasticbeanstalk-ec2-role files: /var/app/dummy.txt: authentication: S3Auth source: https://s3.eu-central-1.amazonaws.com/mybucket/dummy.txt 这里从S3的桶政策 { "Version": "2008-10-17", "Id": "BeanstalkS3", "Statement": [ { "Sid": "e-123-123", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123123:role/aws-elasticbeanstalk-ec2-role" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::mybucket/resources/environments/logs/*" }, { "Sid": "e-123-123", "Effect": […]