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:
/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, !)
, , . , .