awsinaction / code2 Goto Github PK
View Code? Open in Web Editor NEWCode of Amazon Web Services in Action, Second Edition
Home Page: https://bit.ly/amazon-web-services-in-action-2nd-edition
License: MIT License
Code of Amazon Web Services in Action, Second Edition
Home Page: https://bit.ly/amazon-web-services-in-action-2nd-edition
License: MIT License
Dear Michael:
Since AWS updates node.js with new versions:
64bit Amazon Linux 2 v5.4.5 running Node.js 12
64bit Amazon Linux 2 v5.4.5 running Node.js 14
The image processing template in your book (chapter 16) is not working well.
Could you please update the template if possible?
Thank you very much!
Zhengzhong
When trying to run the template for chapter 2, I get ROLLBACK_COMPLETE
status. This is because the AutoScalingGroup creation is receiving the following status:
Unable to satisfy 100% MinSuccessfulInstancesPercent requirement
Logs
2020-01-12 17:12:43 UTC-0500 | wordpress | ROLLBACK_IN_PROGRESS | The following resource(s) failed to create: [AutoScalingGroup]. . Rollback requested by user.
2020-01-12 17:12:42 UTC-0500 | AutoScalingGroup | CREATE_FAILED | Received 1 FAILURE signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement
2020-01-12 17:12:41 UTC-0500 | AutoScalingGroup | CREATE_IN_PROGRESS | Received FAILURE signal with UniqueId i-03a31d0a1bc91baa2
Any help would be awesome! Thank you!
I think right part of the figure is not correct, DNS only depends on CDN not LB ,like Figure 4.3
Trying to use the script in Chapter 5 and it kept failing. Copied the yaml out and started it manually in cloud formation UI and turned off Roll Back on Failure. It is still failing, but the VM loads successfully. However, in the cloud-init, I see these errors:
Cloud-init v. 0.7.6 running 'modules:config' at Mon, 03 Jun 2019 00:10:05 +0000. Up 7.22 seconds.
Loaded plugins: priorities, update-motd, upgrade-helper
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable <repoid>
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: amzn-main/latest
Could not retrieve mirrorlist http://repo.us-east-2.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.us-east-2.amazonaws.com/latest/main/mirror.list: (28, 'Connection timed out after 5000 milliseconds')
Jun 03 00:10:21 cloud-init[2491]: util.py[WARNING]: Package upgrade failed
Jun 03 00:10:21 cloud-init[2491]: cc_package_update_upgrade_install.py[WARNING]: 1 failed with exceptions, re-raising the last one
Jun 03 00:10:21 cloud-init[2491]: util.py[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_package_update_upgrade_install.pyc'>) failed
Cloud-init v. 0.7.6 running 'modules:final' at Mon, 03 Jun 2019 00:10:22 +0000. Up 23.41 seconds.
When load test on the url2png:
Failed to execute Auto Scaling action: Auto Scaling Policy not executed because its effect does not override in-progress scaling actions
Please remove the agent forwarding section, which has well-known exploits, as mentioned in man ssh-agent
("This method is easily abused by root or another instance of the same user.") . Instead, please use proxy jump. Details are here: https://smallstep.com/blog/ssh-agent-explained/
"If you're trying to access internal hosts through a bastion, ProxyJump is a much safer alternative for this use case."
For node.js, you need the following version now:
64bit Amazon Linux 2018.03 v4.9.0 running Node.js
When creating an environment using Elastic Beanstalk The following errors happen:
1- SolutionStackName is a deprecated platform, using [1]
instead of [0]
in the command below fixes that (basically using Amazon Linux 2)
aws elasticbeanstalk list-available-solution-stacks --output text --query "SolutionStacks[?contains(@, 'running Node.js')] | [1]"
2-Unknown or duplicate parameter: NodeCommand
When I unzipped the code, added ProcFile with content web: npm start
the problem went away, need to update the hosted S3 file to reflect that
Steps to reproduce:
First, thank you for the book!
Second, 5.3.2 causes a rollback for me:
curl -s https://raw.githubusercontent.com/AWSinAction/\
> code2/master/chapter05/\
> vpn-create-cloudformation-stack.sh | bash -ex
++ aws ec2 describe-vpcs --filter 'Name=isDefault, Values=true' --query 'Vpcs[0].VpcId' --output text
+ VpcId=vpc-REDACTED
++ aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-REDACTED --query 'Subnets[0].SubnetId' --output text
+ SubnetId=subnet-REDACTED
++ openssl rand -base64 30
+ SharedSecret=w+65YOC1I/vbQMpV48KqqBR8SZJo8Oy5A5PZqIhY
++ openssl rand -base64 30
+ Password=3jfeYkMB5fN9Q5HxaOdM7KHSiI1ELTkmfWuOK4eL
+ aws cloudformation create-stack --stack-name vpn --template-url https://s3.amazonaws.com/awsinaction-code2/chapter05/vpn-cloudformation.yaml --parameters ParameterKey=KeyName,ParameterValue=mykey ParameterKey=VPC,ParameterValue=vpc-REDACTED ParameterKey=Subnet,ParameterValue=subnet-REDACTEDParameterKey=IPSecSharedSecret,ParameterValue=w+65YOC1I/vbQMpV48KqqBR8SZJo8Oy5A5PZqIhY ParameterKey=VPNUser,ParameterValue=vpn ParameterKey=VPNPassword,ParameterValue=3jfeYkMB5fN9Q5HxaOdM7KHSiI1ELTkmfWuOK4eL
{
"StackId": "arn:aws:cloudformation:us-east-1:450REDACTED:stack/vpn/edbbREDACTED"
}
+ aws cloudformation wait stack-create-complete --stack-name vpn
Waiter StackCreateComplete failed: Waiter encountered a terminal failure state
AWS Console says:
ROLLBACK_COMPLETE
Events says:
Timestamp
Logical ID
Status
Status reason
2020-09-30 15:46:06 UTC-0500 vpn ROLLBACK_COMPLETE -
2020-09-30 15:45:48 UTC-0500 vpn ROLLBACK_IN_PROGRESS Parameter validation failed: parameter value mykey for parameter name KeyName does not exist. Rollback requested by user.
2020-09-30 15:45:45 UTC-0500 vpn CREATE_IN_PROGRESS User Initiated
Hello,
Not sure if this is the correct place to raise issues or ask questions in relation to particular chapters but when I run aws ec2 describe-images
the response-time routinely takes minutes to complete. Any idea what's going on?
Are you looking for help with this code for the next edition? I was working through the first Edition and I saw there was a new version of nodecc so I tried it out. I had some problems that maybe I can help you address.
When browsing some time after reading the book, it's a bit hard to navigate the repository. Would it be possible to name folders e.g. "chapter06_IAM" or similar?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.