#aws - December 2018

100 messages

:aws: Discussion related to Amazon Web Services (AWS)
Archive: https://archive.sweetops.com/aws/

December 2018
Gabe
Gabealmost 8 years ago
anyone have any good alternatives to https://github.com/tmobile/pacbot ? I’ve tried getting pacbot setup numerous times and no luck.
joshmyers
joshmyersalmost 8 years ago
@Gabe not really asset mgmt, but CVE complaince checking - have used https://github.com/future-architect/vuls before which was pretty nice
joshmyers
joshmyersalmost 8 years ago
and re compliance for AWS account stuff - https://github.com/alphagov/pay-aws-compliance
joshmyers
joshmyersalmost 8 years ago
Vuls runs on every node for CVE aggregation and dumps reports to S3. pay-aws-compliance runs as a scheduled lambda function against an AWS account and pulling these reports and emails operators if something is not in compliance.
Gabe
Gabealmost 8 years ago
awesome thanks @joshmyers i’ll check them out
joshmyers
joshmyersalmost 8 years ago
It doesn’t look as pretty as pacbot 🙂
Gabe
Gabealmost 8 years ago
haha but i’m sure it works better
Gabe
Gabealmost 8 years ago
i’ve tried once a week every week to install pacbot and every time i get an error
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
@Dave Yu ☝️
Dave Yu
Dave Yualmost 8 years ago
@Dave Yu has joined the channel
sarkis
sarkisalmost 8 years ago
TIL don't try to use the s3 bucket url (even though AWS only auto completes this) in a Cloudfront distribution pointing to a s3 website... be sure to use the s3 website endpoint url!
sarkis
sarkisalmost 8 years ago
It's easy to know you are doing it wrong... you will be greeted with an Access Denied XML page on your cloudfront distribution url if you did the former 😂
Daren
Darenalmost 8 years ago
@Erik Osterman (Cloud Posse) have you setup an EC2 health check feed into slack before?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
yes - quite easily done
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago(edited)
or wait, i thought you mean the status page for EC2
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
(rss)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
... if that's the case, just use the /feed command to add the RSS feed (after adding the app)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
we do something like this for #releases
Daren
Darenalmost 8 years ago
No, instance health/status
Daren
Darenalmost 8 years ago
Looking for any tips before we dive in
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
so that would be SNS notifications, no?
Daren
Darenalmost 8 years ago
Yes, and presumably a lambda to post
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
cloudwatch -> sns -> lambda
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
ya
Daren
Darenalmost 8 years ago
I was hoping you would say: absolutely, heres our a proven TF module
Daren
Darenalmost 8 years ago
🙂
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
so we've used this module to send SNS alarms to slack
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
so now, you just gotta whip up the cloudwatch part
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
we have some examples for that. sec.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
@sarkis wrote them 😃
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago

EC2 health check
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
hrm...
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
yes, one sec
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
this implements one for StatusCheckFailed_Instance
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
now need to glue the parts together. maybe someone else has written a module though... haven't looked
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
(check the registry)
Daren
Darenalmost 8 years ago
ya, thats my next step
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
do let me know what you find
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
it would be sweet to get those notices into slack
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Finally
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
apparently it's openvpn behind the scenes
antonbabenko
antonbabenkoalmost 8 years ago
They promised to deliver it before holidays during this re:invent. Looks promising! $108 per single user full-day connection at least. Not sure how comparable it is to existing OpenVPN setup which has to be maintained.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
lol, that's scary expensive
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
A good Openvpn module is missing, but they have an okish commercial byol and it would suck for them to have something free competing.
Dan
Danalmost 8 years ago
we use the pfsense ami in aws that uses the openvpn client
Dan
Danalmost 8 years ago
its not a bad setup
Dan
Danalmost 8 years ago
and theres an aws vpn integration piece
antonbabenko
antonbabenkoalmost 8 years ago
If I understand correctly you pay per time you actually use VPN per user, so it should be cheaper on week-ends, for example. Still expensive?
antonbabenko
antonbabenkoalmost 8 years ago
I have not used VPN on AWS for the last 3 years 🙂 Last time I used it in Russia where linkedin was blocked 🙂
Dan
Danalmost 8 years ago
you pay for the instance and then pay for the software/hr depending on instance size
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
If you use it together with a few alarms it's probably totally ok. What you don't want is that johnny and his team forget about the vpn connections and just add the office manager's salary to the monthly bill
antonbabenko
antonbabenkoalmost 8 years ago
pfsense’s one cost $288 in total per month, which is $0,34/hour
Dan
Danalmost 8 years ago
the caveat to this, is that im sure you pay for the internet traffic hitting the vpn etc. but thats where you would want to use a split tunnel
Dan
Danalmost 8 years ago
t2.medium $0.08 $0.046 $0.126
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
But wait,, this means tha tif the instance is down then the vpn is down as well ?
Dan
Danalmost 8 years ago
yea so y ou want to try to setup HA with it
antonbabenko
antonbabenkoalmost 8 years ago
exactly, as typical service you have to manage… 😕
Dan
Danalmost 8 years ago
truue
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
I'll be waiting for lambda vpn 😄
Dan
Danalmost 8 years ago
pfsense also comes with other stuff liek a FW and whatnot
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
not just manage but, it can become a bottleneck due to network limit per instance type.
antonbabenko
antonbabenkoalmost 8 years ago
I wishlisted AWS Lambda with GPU support, didn’t happen…
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
so It doens't really sound like a cool thing to have to route all the traffic through one instance.
Dan
Danalmost 8 years ago
yea i guess it depends on your budget cause im sure the aws service isnt cheap
Dan
Danalmost 8 years ago
where the link for the lamda vpn thing
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
it was a joke 😛 🙂
antonbabenko
antonbabenkoalmost 8 years ago
that is what we are trying to compare now 🙂 $288 for manage it yourself for unlimited users vs $108 per single user, no management requried.
Dan
Danalmost 8 years ago
i guess you could also look at https://www.netgate.com/support/
Dan
Danalmost 8 years ago
probably talk them down in price
Nikola Velkovski
Nikola Velkovskialmost 8 years ago(edited)
hmmm then , taking into consideration the management costs and possible incidents should be taken into account.
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
and that is hard to convert into money usually
antonbabenko
antonbabenkoalmost 8 years ago
yes, true, for such critical piece as VPN tend to be
Igor
Igoralmost 8 years ago
When updating the Launch Configuration on an AutoScaling group, it seems like the only way to complete the deployment is to change the min instances to double the size, wait for the new ones to spin up, and then change the min back to what's expected. Is there a better way to accomplish this?
Igor
Igoralmost 8 years ago
Looks like CloudFormation has support for that
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago(edited)
Yes, I don’t believe there’s a way to use launch configurations to trigger a rebuild of an ASG.
antonbabenko
antonbabenkoalmost 8 years ago
Change ASG name to be recreated every time new LC is created… see var.recreate_asg_when_lc_changes - https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/master/main.tf#L34
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Would someone be interested to do a project together on the ASG Launch Configuration update.
Thinking of a module with a Lambda / Step functions. A full ASG recreate is just too heavy sometimes.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
That would be pretty neat @Maarten van der Hoef .
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Have you seen our latest terraform external artifact module? Makes it easy to distribute and deploy complex lambdas without baking zips into git
Igor
Igoralmost 8 years ago
Novice question. Why do the ephemeral ports on an inbound ACL rule for a private subnet need to have a source of 0.0.0.0/0, when the traffic is coming from a NAT Gateway that should be running within the same VPC on a public subnet? Setting the source to the VPC CIDR doesn't seem to work.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
@Igor is your question related to a specific module or in general ?
Igor
Igoralmost 8 years ago
general question
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Ah ok, are you talking NACL or Security Group now btw. For both I don't have an answer tbh, would love to replicate your issue however.

I do know that a NLB will most likely send the traffic through as if it would originate from the source. So for NLB I see the point.

But I was under the impression that one can change the rules the way they want them, without limitations, so I'd like to know what's going on 🙂.
Igor
Igoralmost 8 years ago
I'm talking about NACLs. I was stuck on an issue with my config, and setting the source to 0.0.0.0/0 on private subnet NACL fixed the issue for me. I referred to https://docs.aws.amazon.com/vpc/latest/userguide/vpc-recommended-nacl-rules.html and sure enough, it recommends this configuration as well
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Hardening with NACLs is tricky, and I personally would never start working on them unless someone is really requesting me to do so.
Even when I had AWS consultants over auditing multiple times, NACLS were never part of the audit.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
What is the reason you want to use them ?
Igor
Igoralmost 8 years ago
Security, but I am also trying to make sense of how the AWS NAT Gateway works.
Igor
Igoralmost 8 years ago
I'm pretty sure things are locked down regardless of ACL rules given that there is no route to the IGW from the private subnet
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
is the nat gw working for you now ?
Igor
Igoralmost 8 years ago
Yup, got it to work by changing the source of the NACL rule for ephemeral ports.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago(edited)
I don't think NAT is being translated both ways normally.
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
so you would still receive from an outside IP and you would need to allow traffic from it in your private subnet
Igor
Igoralmost 8 years ago
Makes sense