ruprict (7) [Avatar] Offline
#1
There are a few issues (so far) with the create_eb_env.sh file when running on MacOS.

1.
grep -P
doesn't work...
egrep
seems to get the job done.
2.
sed -i
doesn't seem to mean the same thing. I just removed the -i
3. The
aws elasticbeanstalk create-environment
command fails b/c it wants an instance profile. I have a default IAM service-role and instance role for elasticbeanstalk, but this doesn't seem to matter.

Obvs, it's definitely possible that I am being an idiot. I am stuck on #3, meaning, I've run out of time (right now) to try and get this going.

BTW, any reason you didn't just use CloudFormation for this? Seems like it would be easier and less platform senstive.

Thanks!
Julien Vehent (12) [Avatar] Offline
#2
Thanks for the report. Any chance you could submit a patch to the hosted version of the script at https://github.com/Securing-DevOps/invoicer/blob/master/create_ebs_env.sh ?

I choose not to use cloudformation because it's a complicated language and explaining it would have taken its own chapter. That said, I imagine most people who run ops in aws at large scale use cloudformation or one of its wrapper.
306760 (1) [Avatar] Offline
#3
I faced the same problem with creating the environment. Adding the following option to the ebs-options.json file seems to resolve this issue.

{
"Namespace": "aws:autoscaling:launchconfiguration",
"OptionName": "IamInstanceProfile",
"Value": "aws-elasticbeanstalk-ec2-role"
}