The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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 (14) [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"
}