Flexible beanstalk instance cannot access private S3 file

I am trying to configure one instance of AWS elastic beanstalk with SSL, and I would like to keep the private key in S3 and return the key instance after deployment (to avoid sending the private key to version control).

According to AWS documentation at: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-storingprivatekeys.html , I configured my configuration saved in myproject / .ebextensions / privatekey. configurations:

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
  /path/to/private/key:
    mode: "000400"
    owner: root
    group: root
    authentication: "S3Auth"
    source: https://s3.eu-west-2.amazonaws.com/my_s3_bucket/my_private_key

However, whenever I deploy, I get an error: Command failed on instance. Return code: 1 Output: Failed to retrieve https://s3.eu-west-2.amazonaws.com/my_bucket/my_private_key: 'NoneType' object has no attribute 'is_default'.

beanstalk, aws-elasticbeanstalk-ec2-role, S3 ( AmazonS3FullAccess, !)

, , . , .

+4
1

EC2 eu-west-2. .

, EC2 eu-west-2, , URL -:

https://s3.eu-west-2.amazonaws.com/elasticbeanstalk-eu-west-2-XXXXXXXXX/yourfolderpath/server.key

: https://elasticbeanstalk-eu-west-2-XXXXXXXXX.s3-eu-west-2.amazonaws.com/yourfolderpath/server.key

0

Source: https://habr.com/ru/post/1672402/


All Articles