start	end	text
0	3940	All right. Thanks a lot. And thank you all for filling this arguably a little bit small
3940	7600	room. But it's cool. I'll tell everyone the room was full and not how many people were
7600	12400	in it. So thank you for coming. I work at DirectSupply. I'm a technical fellow and chief
12400	17860	software architect. And I'm here to talk to you about scaling security in the cloud today.
17880	23720	Our company, DirectSupply, we do services and solutions for the long‑term care industry.
23720	30920	So things for nursing homes, assisted living, apps where they can do maintenance on their
30920	35680	equipment, all the way through e‑commerce sites where they can buy products and food for
35680	42360	the residents. So we've been undergoing a journey to migrate into the cloud for about the
42360	48580	past two years. I've been interested in going in that direction for longer than that. But it
48580	53600	was only about two years ago when we decided to do this. And a big part of the talk today is
53600	57580	kind of around how we've migrated somewhat from a traditional infrastructure and software
57580	63560	culture, you know, two different silos, to the DevOps mode where development teams are
63560	69660	owning their own deployments and how we're starting to scale the security amongst those
69660	77290	DevOps teams. Now, I do have a lot to talk about. I will stay out in the hall for questions
77290	80030	afterwards. So if you would just hold them to the end, that would be great. I have some
80030	84190	slides I was going to maybe have to skip over, but hopefully I won't have to. But I wanted to
84190	88530	talk about first our company's cloud vision and strategy that I was part of putting
88530	92890	together. When we decided to migrate into the cloud, we wanted to make sure that we took
92890	96010	advantage of a lot of the things that the cloud was going to get us. We didn't want to
96010	101090	just take our applications as they were running and then shift them to run on EC2
101090	105350	instances in AWS. An argument you might hear is that, well, you don't own the
105350	109970	infrastructure. And that's true. We don't own the infrastructure, but we can architect for
109970	115630	not owning the infrastructure. So part of the strategy included things like immutable
115630	119870	servers. If you've heard of this, this is the idea that once you run a server, you're not
119870	124570	going to change it. If you want to change it, you will tear that server down and relaunch
124570	131510	from a new image that you've built. We wanted to embrace infrastructure as code. We had
131510	138230	limited scripting in our old infrastructure world and part of the programmability of the
138230	141710	cloud is that you can take advantage of all of the things that software development teams
141710	147610	have been able to take advantage of for a very long time. Like version control, peer review,
147610	153410	automated deployments and automated testing. Which takes me to automated deployments. We
153410	156650	wanted to make sure that our deployments as we ran them in different accounts and in
156650	161430	different environments were the same. And the best way to do that is through automation. You
161430	165430	can write a very long document with step by step pros of what to do, but if somebody's
165430	171430	doing it, they're going to do something slightly different each time. A big part of what I'll
171430	175990	be talking about today is we wanted to encourage defaults to be secure so that as
175990	181510	development teams started rolling infrastructure, they would get secure defaults. And maybe
181510	184830	they weren't even consciously getting them, but we were trying to take some of those
184830	188890	decisions away from them so that when they just ran the thing the easiest way that we
188890	197150	provided for them to do it, it would be secure. And finally, and this is a bit more of a
197150	201070	migration over the next couple years, but I will touch on this later as we're starting to
201210	206690	provide a platform as a service for our software delivery teams. And the idea here is
206690	212750	that now that we've scaled infrastructure out and ownership out to across all of our
212750	217990	software development teams, now we want to provide more abstractions for them to use to
217990	225520	run their applications in the cloud. So I want to start by just talking about the
225960	230120	programmability of the cloud and some of the things that it can get you. And it kind of
230120	235320	hit me that there's pretty much four layers of making use of programmability with your
235320	241020	infrastructure. The first is you have no automation. You do things by hand and you have
241020	247420	people that really like doing things by hand. Eventually you start to script up some of
247420	251980	your work. If you've worked against a traditional infrastructure like a VMware, some of
251980	257620	those have been a lot more difficult to automate. And part of the programmability of the
257620	262820	cloud, it makes that a lot easier and a lot more reproducible. As you begin to progress,
262820	267540	you'll get into DevOps and continuous delivery. And again, now we're fully taking
267540	273200	advantage of the cloud for our deployment reasons. But the final level of taking advantage
273200	281060	of cloud programmability is using it for evil. So I'm going to hit with just one quick thing. We
281060	289340	had an accidental commit to GitHub of some AWS access keys. And I don't know if anyone's
289340	297660	experienced that, but what do you think happened? GitHub, it was public. You don't get to
297660	303680	answer because you know what happened. We might talk about this in threat modeling and
303680	309900	your threat might, like your impact could go all the way up to someone could potentially
309900	314460	like encrypt all of your data or delete or destroy all of your data in that account. Destroy
314460	320700	all of your infrastructure. But because of the automated nature of the programmability of
320700	324380	the cloud, what happened was a bot found that on GitHub and then just started launching
324380	331360	instances to mine cryptocurrency. So there was really no damages. There weren't any
331360	336660	damages to our infrastructure. Amazon noticed this within a few minutes and disabled the
336660	340280	account and it was a development account. So it wasn't our production account that was
340280	347580	disabled. But it's kind of that idea that if you're not ruthless enough in attacking someone
347580	351600	else is going to take that place. And there was a very small window of opportunity where
351600	356380	somebody could do damage. And it seemed like the lowest, like if you talk about like
356380	361540	electricity is going to follow the path of least resistance, the attack was one of
362660	368480	convenience and it cost I think about $800 when it was done because we got stuff shut down
368480	373880	really quick. So in the end it wasn't that bad. But I just wanted to point out that you can use
373880	381340	the same programmability of the cloud for both good and evil. So as we're migrating into
381340	386060	this mode of DevOps, we started trying to figure out how are we going to be able to do more
386060	392220	with less. And I don't mean do more, like do less security. We wanted to do more security.
392220	396840	But since things are now spread out across development teams without hiring teams and
396840	400780	teams of individuals focused on security, we weren't going to be able to keep up with
400780	410150	development. So we have to start spreading some of that out across the teams. I'm going to
410150	414950	talk now about a few of the open source things that we use to both help with that issue we
414950	423550	had with the GitHub push of the keys. And also solve a number of our other security issues
423550	427990	in the cloud. And the first is a product from HashiCorp called Vault. I don't work for them.
427990	433210	I'm a huge fan and their open source product gets you a lot of things you wouldn't even
433210	439110	expect. Like companies that do open source sometimes will save the LDAP integration or the
439110	442950	UI for the commercial versions. But they've got so much in their open source that it's
442950	448010	almost unbelievable. But what Vault is, and this is right from their website, it's a product
448010	453090	to secure, store and tightly control access tokens or access to tokens, passwords,
453090	457910	certificates, encryption keys for protecting secrets and other sensitive data using a UI,
457910	465210	CLI or an HTTP API. So it does a lot of stuff. And they kind of flag it as security as a
465210	471090	service. You've got this very secure box that does all these things for you. We're not using
471090	477450	it for all of its uses. We are using it, uh, for these use cases. We're using it to store
477450	483250	static secrets. Things using its key value secrets engine. And these would be things like
483250	487790	passwords to back end services. If we had like access to a third party API and we needed to
487790	492230	store some sort of key. Um, that's a piece of information that does not change. We need to
492230	500850	store and access that securely. Vault also has the potential to deal with dynamic secrets. And
500850	506130	these are things that can change. And the idea of them changing is interesting because it
506130	512470	allows you to lease them for a certain amount of time. First that we, the first, uh, dynamic
512470	518910	secret engine that we use is one for Postgres. Um, historically, when we were on prem, the
518910	523550	vast majority of our databases were running Microsoft SQL server and we had them on our
523550	528490	domain and we used integrated Windows authentication between applications in the
528490	533650	database. And then when users needed to get access to those databases, we granted, you know,
533650	538170	put them in roles based on their domain account. We wanted something similar, but with the
538170	541470	dynamic nature of the cloud and things coming up and down all the time, we didn't want that
541470	546390	coupling to a domain. So we've not made any attempt as we started to move into Postgres to
546390	551030	get those onto our domain or to do LDAP authentication. Uh, but one thing that Vault can
551030	557870	do is it can dynamically generate me, if I'm a developer, a username and password to access
557870	563870	that Postgres server that's good for an hour. So Vault will authenticate me on our domain and
563870	569130	then I have access to a policy that lets me generate a username and password for a specific
569130	574410	Postgres instance. And it's good for a certain amount of time. So it gets us effectively the
574410	579650	same thing without the database having to be tied to our domain. Uh, the second thing is that
579650	584650	after our incident with the GitHub push of the access keys is we don't issue access keys to
584650	591790	anybody anymore. Vault has an AWS secrets engine where me as a developer, I can authenticate to
591790	597510	Vault using my domain credentials and then I can request a key pair that's good for a certain
597510	602790	amount of time. And there's a maximum. I have an example of how we do this. Um, but then if
602790	607130	that key got leaked, that would further limit the usefulness of the how, what you could do
607130	613550	with it. Um, and the third thing that we're using it for right now is one time password to log
613550	620070	into EC2 instances. It can do the same thing for, uh, Linux servers that it can do for like
620070	623790	Postgres. It can generate a username and password that you can use to log in and it's only
623790	632090	good for so long. Okay, so authentication to Vault, um, all of the components to Vault are
632090	636390	pluggable. So you can authenticate to it different ways. We use LDAP for our user accounts
636830	642350	and then with systems that are running in AWS, they'll use IAM to authenticate. Um, you can
642350	647610	also use username and password or GitHub or any other mechanism, but it's all pluggable. Um,
647610	652670	but I wanted to show really quick from the CLI how, I hope this is visible in the back, how we
652670	656890	authenticate to Vault. We set our Vault adder environment variable to point at our Vault
656890	662470	server and then we just issue a Vault login method LDAP and username equals whatever my LDAP
662470	668230	username is. In a few seconds, it comes back. It issues me a token. That's good for,
668230	675130	according to the output, 60 minutes. And at the bottom, you can see the policies that I have
675130	680350	access to. This is in our development tier, so in this tier, I'm effectively an admin and you
680350	685230	can see I have access to three policies. One is AWS API engineer, meaning that I'm an
685230	690510	engineer that's going to use the CLI or the SDK to access AWS and that's what lets me
690510	697170	generate access keys for AWS. Uh, there's the EC2 user OTP for one time passwords to let me
697170	702390	generate one time passwords. Uh, this is the admin level, so this would be to any EC2
702390	710410	instance. And secrets read write allows me to get access to the key value store. You can make
710410	715710	these policies as granular as you wish and they can be specific to just one path involved. So
715710	722570	you might have an application secrets at slash secrets slash my application and if you have a
722570	726810	team that operates just that application, you can define your policies so that they can just
726810	734550	get access to secrets under that path. Uh, but these policies are pretty broad, uh, since I am
734550	741210	an admin on this, uh, tier. Uh, the next piece is just an example of how you interact with the
741210	749770	key value secrets engine. In this case, I'm issuing a vault KV get command. I'm asking for a
749770	754070	specific field because what we store at those keys are JSON documents. So you can have any
754070	760290	number of, uh, key values within that one document. Um, I'm asking for a field called gossip
760290	765310	encryption key and it's at the path secrets slash console, which is another product we're
765310	770150	working to roll out. Um, and then the output is simply the secret. So what would happen is
770150	776350	the application that needs access to this secret would have an IAM policy defined that would get
776350	781710	them access to a vault policy which says I can read this secret. And then when those instances
781710	786070	run, when they start up, part of their bootstrap script will be to authenticate the vault using
786070	791610	IAM and get this information and most likely, uh, plop it into an environment variable for the
791610	799110	process. So at no point do we need to build these secrets into our images. We request them at
799110	802670	runtime or at start time and then they become part of the environment for whatever process
802670	813130	needs them. A quick example of how we generate secrets for Postgres. This look, the syntax is a
813130	818110	little bit different, but in this case we have a databases secrets engine for a specific
818110	824390	database. So it would be databases slash myDB. And then when you configure it, you define
824390	828830	policies within there for like read only or read write. And then that ties back to the
828830	833510	permissions that the Postgres users have on your underlying database. But if I issue a vault
833510	841650	read databases myDB slash cred slash read only, you'll see it issues me a lease for one hour and
841650	845850	it gives me a username and a password which I can then use to go attach to that Postgres
845850	856050	instance. After an hour, it's expired and does not work anymore. Likewise for AWS, for as a
856050	861850	developer, when I need access to a key pair to use, I will issue a vault write to AWS slash
861850	869010	STS slash in this case engineer. And the way this manifests is then I will assume an engineer
869010	874510	role within AWS. We define a role and if you've ever used federation or done any type of role
874510	878890	assumption, you're not logging in with an IAM user, you're logging in, you're
878890	884170	authenticating some other way and then you're assuming a role within IAM. So when I issue
884170	890230	this vault write and when I put this together, I asked for a TTL of 600 minutes just to see what
890230	895570	would happen because I didn't know. And it did issue me a one hour, it was maxed at one hour
895570	900410	lease. So the token I got back was good for one hour and then I get an access key, a secret key
900410	906150	and a token which I can use to run AWS configure. I did have to abridge part of this security
906150	910710	token but the access key and secret key were actual keys for our accounts but I'm confident
910710	919060	that they are no good anymore. So I'm showing them at DEF CON. Get a picture. It will be in
919060	925960	the slides. For one time passwords, I want to connect as an operations person to an EC2
925960	932660	instance and the way I do that is by issuing another vault write to SSH slash creds, that's
932660	940120	the secrets engine for a read user OTP, this is read only access to an EC2 server and I give it
940120	946960	the IP address. It again has a lease duration of one hour and it outputs the username to use,
946960	952440	read user and the key which is the password. So then you can just do a regular username
952440	960880	password SSH onto that EC2 box. Nothing to clean up after an hour. So that's kind of a lot of
960880	965420	what we're doing with vault. The next thing I want to talk about is something that we've
965420	973040	deployed in order to enforce policies against our AWS configuration itself. Everyone's seen
973040	978300	the news, company releases a public S3 bucket and someone finds a bunch of data or something
978300	983180	else is misconfigured and there's a big data leak. But with teams owning their own
983180	988060	infrastructure, we have deployed a product from Capital One, that's open source called
988060	1000300	Cloud Custodian. Yeah. Right. Well, maybe they do. Maybe they don't have their policies defined
1000300	1006860	correctly. But what we're getting from Cloud Custodian is the configuration governance. Again,
1006860	1012660	it's policy as code. We get automated checking and enforcement of infrastructure that gets
1012660	1019440	deployed. And we're running multiple AWS accounts. So even though this is a reactive thing,
1019440	1023720	the infrastructure gets built and then Custodian notices it doesn't fit the policy and then it
1023720	1028020	does something. But that happens in our development account, which is before it would
1028020	1034540	get up to production, theoretically. It does get us policy as code. So again, we have
1034540	1039400	automated deployments of our policy. We have peer review of our policy and we have version
1039400	1048540	control. And it also supports notifications for notifying owners of systems. Again, if you're
1048540	1053240	operating in a DevOps mode, teams are owning their own systems and infrastructure. So we
1053240	1059040	have been tagging resources in AWS with who owns what. So as part of that, since we have an
1059040	1065420	email or an SNS topic as a tag on our resources in Amazon, Custodian can look at those tags in
1065420	1071000	order to figure out how to deliver a notification that it did something. So one of the key
1071000	1076100	pieces of Custodian when we looked at it for us was that it does have the ability to take
1076100	1081120	action. And what I was trying to not do and something that in my mind does not scale well is
1081120	1084840	to just have a tool that gives you a list of work to do. If you just get a list of all the
1084840	1091080	problems, then you have to go do all that work. And it would be much more preferable if you
1091080	1097060	could instead have it automatically take some action where it makes sense. And I want to show
1097060	1102380	you what one of the example policies would look like before I talk too much more about that.
1102820	1109120	But they're all defined with YAML. There's quite a lot on here. But effectively, this is a
1109120	1115420	policy that we have written for unencrypted S3 buckets. We wanted to just encrypt everything so
1115420	1119800	we didn't have to deal with figuring out what type of data was in there. So we wanted to make
1119800	1126940	sure that buckets were encrypted. So there's a resource type, which is AWS S3, ensure that S3
1126940	1132100	buckets are encrypted. And then there's a mode. And what's interesting about Custodian is when
1132100	1138240	you deploy it, you can run it several different ways. You can run it as a batch job from a CLI.
1138240	1144320	It's just a Python module that can be run as a batch task. It can deploy automatically into
1144320	1151020	AWS Lambda to run scheduled Lambdas or Lambdas that are triggered by CloudTrail events. Or it
1151020	1158020	can generate CloudTrail rules inside of AWS. The method that we're using for most things is to do
1158020	1162820	periodic scheduled Lambdas, hence the rate of five minutes. So this will run every five
1162820	1168020	minutes. So again, it's reactionary. Within five minutes, though, in our development tier, what
1168020	1173120	it's going to do then, if it finds, you notice in the filters it says bucket encryption state
1173120	1179040	false. Any buckets that are not encrypted, it's going to execute the actions for. And in this
1179040	1184420	case, the action we have is type set bucket encryption. So while we could take a more heavy
1184420	1188300	handed approach and delete the bucket, we are trying our best to take a less heavy handed
1188300	1192720	approach. And if we can just make it okay and then let the person know that we made it okay, or
1192720	1196560	the owners know that we made it okay, we're trying to do that. So in this case, it will get
1196560	1204720	encrypted and then owners will get notified. So how the notification works, it has a mailer
1204720	1213060	component that is part of it. And the mailer component, you give it a little template for like
1213060	1217260	an email message. I think it can integrate with some other services, too, because really what
1217260	1222620	it does is it fires off a message into an SQS queue. So you could consume that and do whatever
1222620	1227960	you wanted with it. We're simply using it for an email notification, but with SQS you could go
1227960	1239940	notify pager duty or some other type of end point. So what it does is it looks at, um, the, uh,
1239940	1245400	the resource owner in the two, that's defined as part of our mailer configuration. And what we
1245400	1251300	defined in our mailer configuration was to look for a certain number of tags. And we use owner
1251300	1256580	email as a tag and we also use owner SNS topic as a tag. So if either of those tags are
1256580	1261820	defined, it's either going to send an email to the email address that's under owner email, or
1261820	1268940	it's going to notify an SNS topic that's listed in the owner SNS topic tag. And then there's a
1268940	1274020	little template for the message that they get. So it'll say an S3 bucket that is unencrypted has
1274020	1280560	been detected. The bucket has been encrypted. Uh, so we're using custodian for a ton of
1280560	1285980	things. We're using it for, um, deregistering old AMIs that aren't being used, for
1285980	1292600	whitelisting AWS services, adding security groups, patching, and adding security group to
1292600	1299540	patching for running or to running EC2 instances. Let's talk a little bit now about, uh,
1299540	1304480	scanning and some of the things we've had to do because we are running immutable servers or
1304480	1308740	servers as cattle where we don't want to fix them, we don't want to patch them, we want to
1308740	1314160	patch the image and then destroy them and have them come back from a new image. So one of the
1314160	1318520	issues that this caused for us is that if we defined a bunch of scans that had instances
1318520	1323980	running, those instances might not be around for very long. Uh, so when they went away, we'd
1323980	1328900	have to go back and update all of our scans. So we wanted to eliminate any manual effort to
1328900	1335600	update our scan configurations. We decided to group instances logically by owner, so the host
1335600	1341220	doesn't matter, the IP doesn't matter, what we, what matters is who owns the instance that's
1341220	1348200	running at this point in time. And we wanted to support custom scans based on tags. So really
1348200	1355580	we have two approaches to this and each of them relied on a lambda. Um, in the first case, we
1355580	1361400	are using, we are integrated with tenable IO for scanning instances and there is a method of
1361400	1365760	scanning where you scan from your scanner and you have a scanner running which is in the lower
1365760	1370060	left and again we're running that in an auto scaling group of one so that might go away at any
1370060	1375400	given time. So what we have to do is we run a lambda every so often to update the scanner on
1375400	1380380	the scans that are defined. So when this gets destroyed and comes back as a new host, we'll
1380380	1385040	then go update it on any scans that it was supposed to be defined on and that's all based off
1385040	1392040	of tags. Likewise with EC2 instances, we have another lambda that based on tags will add them
1392040	1397940	to appropriate scans. So if we want to do an agent based scan, or sorry, a scanner based scan,
1397940	1404500	um, we can do that. And we don't have to maintain it. The lambda runs every so often and then the
1404500	1409040	scan gets updated. Um, and then you see that little, that red box is a security group that's
1409040	1413920	around those instances. We have a custodian policy that adds the rule so that the scanner can
1413920	1420100	get in. Uh, so that's one scenario. Uh, another scenario is agent based scanning. We've
1420100	1425840	updated all of our base images to include a tenable agent so that when new systems get
1425840	1429340	launched, they'll automatically have the tenable agent installed. So when they come up,
1429340	1434040	they'll register, they'll show up as an agent in tenable. Um, but we can't add them to a group
1434040	1438080	or add them directly to a scan because if they get destroyed, it's going to go away and then
1438080	1442800	they would have to be manually updated. So we did another thing based off of that owner email
1442800	1448820	tag where we grouped them logically. We created, we created agent groups inside of tenable for
1448820	1457280	each owned group of servers. And we have a lambda that runs that adds the agents to the relevant
1457280	1462340	groups. When agents go offline, they automatically get cleaned up after a day or two based on
1462340	1467920	the tenable configuration. Um, but for any instances that came back after having been
1467920	1472360	destroyed, the lambda runs and then they get added to the groups. So we're able to define
1472360	1476780	scans to scan machines that are in agent groups and we don't have to do any maintenance for when
1476780	1484670	those machines go away. Uh, two other quick things I'm going to touch on are just how we're
1484670	1489970	using two other products from HashiCorp, Packer for building images and Terraform for launching
1489970	1495510	our infrastructure. And these are in the vein of that secure by default. Uh, so this is sort
1495510	1500510	of the start of our platform as a service mentality where we're providing things for people
1500510	1506050	to consume so that it's easy for them. Um, this is a, a sample Packer build template that we
1506050	1511150	have for, uh, Amazon Linux and this is our base template that all the teams use. And then
1511150	1515370	they just pass variables into it. So as a cloud development team, we created this initially
1515370	1519830	and then all the teams started using it. And a, a few of the security features I have
1519830	1523870	highlighted that went into the initial version so that any team that consumed this just got
1523870	1527630	those and they didn't even have to think about what to set them to. Uh, the first is that when
1527630	1533190	they select a source AMI based off of a filter, it restricts it to just instances or images
1533190	1538910	that are owned by our accounts. Um, we're also encrypting the boot volume by default and
1538910	1547330	applying a tagging policy. Uh, with Terraform, we've started, you know, Terraform could be a
1547330	1552230	talk all by itself, um, but just a one shot here of some of the things we're doing. With
1552230	1557330	Terraform, you deploy resources and then any group of Terraform code can be used as a
1557330	1561850	module. So we've defined reusable modules for a lot of things. One of them, this is an
1561850	1567670	example of us, uh, using our web farm module where a consumer of this just has to specify
1567670	1573910	some information like which VPC, their service port, min and max size, um, what their health
1573910	1579490	check path is and then if they want an auto scaling notification, they can pass an ARN. Um,
1579490	1582770	but what they get from this is all the infrastructure designed as we saw fit to
1582770	1586570	architect it without having to launch a load balancer. Make sure it was in the public
1586570	1590270	subnet if they were internet facing. Do all, make sure all their instances are in the
1590270	1596750	private subnet. Get everything registered with DNS properly. So it does all that for them. Um,
1596750	1601890	I have some stuff of what, what went not, not so well. I'm running out of time so I will,
1601890	1607530	I'll, I'll leave this up here for a second and then we can take any questions out into the
1607530	1612670	hallway. Um, but really it was our pace that made us kind of be, start playing catch up from
1612670	1616910	the beginning. Um, so we started doing a lot of work before we had custodian deployed.
1617050	1621970	Teams started rolling their own Terraform before we had modules for everything. Um, so
1621970	1625310	it's stuff like that. We have a lot of work we still want to do and one of the cool things
1625310	1630150	about DEF CON is I'm sure everyone has great ideas for me, uh, on how we can take this
1630150	1634970	further or alternative ideas. So if we could chat about that in the hall, uh, that would be
1634970	1640490	great. I will hang around for as long as people want to talk. Thank you.
1643490	1646850	All right. We got five more. Okay.
1651370	1663450	All right. Thought he was waving me off. So all right in the back. Yeah. So when we, we
1663450	1669110	automate, we use Chef to build images with Packer. Uh, Packer builds the image and you can,
1669110	1673830	you do VMware or EBS on Amazon or several other formats. And then there's different
1673830	1679710	provisioners. So we use Chef. Um, as part of our Chef, we use InSpec to run, uh, tests. So as
1679710	1683050	part of our image build pipeline, we'll run all of our tests before they get merged back to
1683050	1689310	master. And then that'll build us our real AMIs. Um, with Terraform, we've had with the
1689310	1693930	modules, what we'd like to do is run a quick smoke test to stand up an instance of that
1693930	1700910	module. So a web farm, or, um, we have another one for like, uh, an RDS, uh, Postgres instance.
1700950	1705210	So we'll have a test to stand that up and then tear it down. There's a lot more that we
1705210	1708310	could be doing with some of that. Um, but that's just what we've done so far.
1709270	1722960	Yeah. In the hat. The tags. So our tagging structure, I think, is fairly standard. We use
1722960	1728280	tags, application for which application it's part of, environment, which environment it's
1728280	1732640	running in. Um, because in some accounts, we might have more than one environment running,
1732640	1738220	like QA or integration testing on like a middle tier. Um, and then we have role. So the role
1738220	1743720	within that application and environment, like database or web server. Uh, so those are the
1743720	1748760	primary tags we use for grouping things. Um, and then as far as ownership goes, we use
1748760	1756820	those owner email tags or SNS topics to keep track of who owns what. Um, yeah.
1759600	1771120	Yeah. You would think so. Um, I have more details out there. It's, it's kind of a long
1771120	1774860	discussion, but, um, they kind of force us into a mode where we weren't able to take
1774860	1779040	advantage of some of the stuff like AWS organizations and control tower and some of
1779040	1785500	that stuff they have. It is. It didn't exist when we, uh, when we first started working
1785500	1789580	with them. And then they, we just haven't evolved it around. I don't even know if they
1789580	1795840	support it yet, but we have to work with them on that. Uh, not yet. I got about a minute.
1803260	1812500	Oh yeah. Well, when teams update the code, if they violate the policy, they're going to, that
1812500	1816920	action is going to run, which may be turn on encryption if it's not there, but it may be
1816920	1823760	destroy the resource. And we have had some race conditions with things like, um, if you
1823760	1829360	deploy a load balancer, we wanted to make sure that you had an HTTPS listener so that you
1829360	1833420	weren't just rolling an unencrypted web service. So the, but the problem is the load
1833420	1836820	balancer gets deployed before the listeners. And then the policy was catching that and
1836820	1840960	destroying things before the whole thing was done. Uh, likewise with tagging on instances,
1840960	1845780	if we wanted to make sure things were tagged, uh, tagging is a separate operation. That's
1845780	1850580	when Terraform stands up, uh, an EC2 instance. And that might be because of the AWS API,
1850580	1856020	uh, but it'll create the instance and then subsequently apply the tag. So if custodian
1856020	1860180	runs in between those two, it's going to say, you don't have tags. I'm going to destroy you.
1860600	1862280	Yeah, we can go out in the hall. Yeah.
