#aws - January 2019

155 messages

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

January 2019
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
Anyone tried to figure out what the SSM Sessions Manager client binary is doing ?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
😃 is this the one that's closed source?
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
yeah I guess so ..
sarkis
sarkisalmost 8 years ago
whoaaaaaaa
sarkis
sarkisalmost 8 years ago
now to move jenkins slaves to ecs fargate 😧
LeoGmad
LeoGmadalmost 8 years ago
@LeoGmad has joined the channel
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
that’s nice
Maciek Strömich
Maciek Strömichalmost 8 years ago
@Maciek Strömich has joined the channel
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Discovered this today
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
didn’t realize they had an official ecs-specific cli tool
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
Actually, it was improved greatly lately
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
it used to be very limited, we are considering migrating to use that to manage the services+docker-compose files
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
as tbh terraform is really shitty for deploying ECS tasks
antonbabenko
antonbabenkoalmost 8 years ago
yeap, and many people like to use this - https://github.com/silinternational/ecs-deploy
Matthew
Matthewalmost 8 years ago
Anyone work with EKS clusters and Databases being in seperate VPCs?
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
@Matthew you have to do VPC peering and add the EKS workers security group as ingres to the database security group
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
this is how you do VPC peering b/w EKS VPC and backing services VPC https://github.com/cloudposse/terraform-root-modules/tree/master/aws/eks-backing-services-peering
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
in the database module, you can allow SG from EKS workers, e.g. https://github.com/cloudposse/terraform-aws-rds-cluster/blob/master/main.tf#L22
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
Matthew
Matthewalmost 8 years ago
You're a God sent @Andriy Knysh (Cloud Posse) I appreciate you, going to explore now
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
@Matthew if you need read only, it’s possible to setup replicas in a separate VPC without peering
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
but for rw, you’ll want the peering
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
Oh man this is awesome, it supports EFS 🙂
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
oh wow, finally a real backup solution for EFS?
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
that's what the docs say
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
🎉
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
freaking finally!
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
😞 not in our region
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
which region is that ?
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
Frankfurt
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
oh, yeah they are always behind 😞
btai
btaialmost 8 years ago
does each rds instance type have a max num of connections it can possibly have?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Not sure about hardlimits
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
That's mostly constrained by instance type. The only chart I have seen is of default values by instance type.
btai
btaialmost 8 years ago
im trying to find concrete documentation in aws about connection limits for instance types but i cant really find it
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
I'm super excited for a backup solution for EFS, assuming it's sane.
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
As I had to write one previously
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
and it works fine, but it's just annoying.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
ya, we were using datapipelines to call s3 sync
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
hmm I never thought of doing it that way
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
that's actually clever
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
I like it
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
https://github.com/awslabs/efs-backup - I forked this and made it not stupidly expensive
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
by backing up to an EBS volume that gets snapshotted etc
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
as I didn't like the idea of using hardlinks or using yet another EFS file system as a backup destination
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
lots of lambda
Andrew Jeffree
Andrew Jeffreealmost 8 years ago
and terrible bash scripts
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
Daren
Darenalmost 8 years ago
@Erik Osterman (Cloud Posse) do you know if increasing IOPS has an impact on performance while it is being applied?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
I don’t...
Maciek Strömich
Maciek Strömichalmost 8 years ago(edited)
Hey folks, is anyone here using ses configuration-set to track open/click events? general configuration works fine but I’m trying to figure out a more fine grained solution where I can graph individual link clicks in cloudwatch.
Maciek Strömich
Maciek Strömichalmost 8 years ago
I’m trying with different ses:tags in email links but it seems that regardless of the configuration they always are categorised as a general click event in the configuration-set name in cloudwatch metrics
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago(edited)
Oh interesting… haven’t ever looked into doing that.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Maybe some one in #terraform has seen something
Maciek Strömich
Maciek Strömichalmost 8 years ago
it’s easy with sns/firehose because you can either save the object in s3 or you can trigger lambda function which will then put it in whatever service there is
Maciek Strömich
Maciek Strömichalmost 8 years ago
but there’s also direct cloudwatch destination which seems perfect
Maciek Strömich
Maciek Strömichalmost 8 years ago
especially if you’re interested only in aggregations
Maciek Strömich
Maciek Strömichalmost 8 years ago
and graphs
Maciek Strömich
Maciek Strömichalmost 8 years ago
but it seems it doesn’t work as expected
Maciek Strömich
Maciek Strömichalmost 8 years ago
or maybe I expect too much from ses -> cloudwatch integration ;D
Igor
Igoralmost 8 years ago
Is there an MFA solution for Windows bastion hosts (for RDP)?
tweetyix
tweetyixalmost 8 years ago
Anybody knows a tool to forward logs from a k8s kind pod/container (minicube or such) into cloudwatch?
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
we have this https://github.com/cloudposse/prometheus-to-cloudwatch, it forwards logs from prometheus to CloudWatch (you need to have a Prometheus endpoint to scrape)
Maciek Strömich
Maciek Strömichalmost 8 years ago
@tweetyix if you’re using files to store logs then most probably you’re already mounting logs dirs from host to your containers. in that case start a container with awslogs and point it to the main logs directory
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
Hey people. I've a question. How do you tackle Datadog with ECS in awsvpc mode.
e.g. If I have all tasks running in awsvpc mode then I would need service discovery to be able to get to the ip:port of the DD daemon.
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
If I use bridge mode I have the same problem, I need the ip of the instance
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
if I stick the DD docker in the task , then I have repetition in the task definitions for every app.
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
wat do ?
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
run it as a task with replication mode DAEMON
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
that's all fine
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
but afaik the app needs to push metric to it's endpoint
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
which is an ip:port combo
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
afaik the docker host always has a bridge ip, like 172.17.0.1
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
using rep mode daemon, the port is the same everywhere
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
so if the aps that run in awsvpc mode can see this I am good to go
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
you'd need to test that, haven't tried myself
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
it doesn work 😞
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
and what about ping $(curl <http://169.254.169.254/latest/meta-data/local-ipv4>)
Nikola Velkovski
Nikola Velkovskialmost 8 years ago

curl: (7) Couldn't connect to server
Maarten van der Hoef
Maarten van der Hoefalmost 8 years ago
ok, but you allow the ec2 metadata from your tasks ?
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
well that's what I am thinking now
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
why this is not working
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
give me asec
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
wait I am drunk 🙂
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
it works
Nikola Velkovski
Nikola Velkovskialmost 8 years ago(edited)
yup it gives the ip of the instance
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
allright
Nikola Velkovski
Nikola Velkovskialmost 8 years ago
that's one way to do it thanks!
tweetyix
tweetyixalmost 8 years ago
@Maciek Strömich I don't have access to the host, neither persistent storage. Do you know if awslogs could be setup inside the container?
Maciek Strömich
Maciek Strömichalmost 8 years ago(edited)
@tweetyix yeah it can but this would kind of break the concept of single purpose containers because you would need some process supervisor which would be PID 0
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
Maybe you can use a sidekick container and a shared volume
Gonzalo Peci
Gonzalo Pecialmost 8 years ago
otherwise, why not use the docker log drivers?
joshmyers
joshmyersalmost 8 years ago
Get the logs into CloudWatchLogs and then you can pump into Datadog?
btai
btaialmost 8 years ago
thoughts on ebs optimized?
joshmyers
joshmyersalmost 8 years ago
Do you need it?
btai
btaialmost 8 years ago
when does it make sense?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago(edited)
when you look at the IO charts in cloudwatch and see that IO is a bottleneck (pegged)
joshmyers
joshmyersalmost 8 years ago
Note that if you blow through your EBS credits, no bueno
joshmyers
joshmyersalmost 8 years ago(edited)
Your instance basically becomes unusable and CPU spikes as things queue up waiting for IO
joshmyers
joshmyersalmost 8 years ago
bad bad bad
johnbeans
johnbeansalmost 8 years ago
if all my services use fargate, is there any reason why i would not just place them all into a single ECS cluster? what are some reasons for having a separate cluster for each service?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
So I think it comes down to a few things
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Mostly the security architecture
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
You might want to run in multiple AWS accounts (recommended)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
E.g. Dev, Staging, and Prod.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
You could also think of each ECS Fargate cluster as a namespace
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
There's no extra cost to run more than one fargate cluster, so it can be a way to logically isolate resources
johnbeans
johnbeansalmost 8 years ago
thanks erik! makes sense 👍️
Bogdan
Bogdanalmost 8 years ago
Finally!
Igor
Igoralmost 8 years ago
Is it possible to store a CodeDeploy package in a different region? The s3:// protocol syntax does not seem to provide the ability to specify a region.
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
@Igor
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
S3 bucket names are globally unique
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
but when you create a bucket, you specify a region where it will be hosted
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
so a bucket always belongs to a region
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
if you specify a bucket hosted in diff region in CodeDeploy, it will use it (if all the permissions are in place)
Igor
Igoralmost 8 years ago
@Andriy Knysh (Cloud Posse) That's what I thought, but I got the following error message:
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
Igor
Igoralmost 8 years ago
Or is this a permissions error?
Igor
Igoralmost 8 years ago(edited)
The instance has the AmazonEC2RoleforAWSCodeDeploy policy which allows s3:GetObject on *
Igor
Igoralmost 8 years ago
The revision is using the following location: s3://{bucket_name}/{key_prefix}/{key}.zip
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)almost 8 years ago
maybe you need to use S3 regional endpoints https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
Krit
Kritalmost 8 years ago
Hi all.
An ELB/ALB with a public IP can serve instances/target groups with private IPs, correct?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Yea, provided routes and security groups are setup correctly
Krit
Kritalmost 8 years ago
That won’t depend on a IGW or NATgw, right?
Krit
Kritalmost 8 years ago
And the instances won’t be able to access the public internet beyond serving through the ELB/ALB
Krit
Kritalmost 8 years ago
If one of the above isn’t present
Krit
Kritalmost 8 years ago
(Well, if the NATgw isn’t present, since they don’t have public IPs)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
So if there is no NGW they won’t be able to egress directly to the public
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
But the ALB can still send/receive requests to the instance
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
The public subnet will need an IGW
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
And the ALB will need to be on the public subnet
Krit
Kritalmost 8 years ago
Ah of course, LB wouldn’t be able to get out without IGW.
Krit
Kritalmost 8 years ago
Thanks again Erik
Gabe
Gabealmost 8 years ago
a useful little plugin for AWS if you have many roles https://github.com/tilfin/aws-extend-switch-roles
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
that's slick
Maciek Strömich
Maciek Strömichalmost 8 years ago
cloudformation has now an attribute protecting you from accidental data loss upon update replacement
Maciek Strömich
Maciek Strömichalmost 8 years ago
and also EKS became ISO and PCI compliant
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Oh great!
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
I didn’t see that
Maciek Strömich
Maciek Strömichalmost 8 years ago
yeah, last week
Maciek Strömich
Maciek Strömichalmost 8 years ago
and also last week AWS introduced pull from private ecr repositories with secrets manager integration
Bogdan
Bogdanalmost 8 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
I don’t think we handle that
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 8 years ago
Also, this is related to #terraform ?
Bogdan
Bogdanalmost 8 years ago
Thanks @Erik Osterman (Cloud Posse) - I'll ask in #terraform