SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
Cloud Custodian
Fleet Management in AWS
Source Source
Serverless
BUT
We still have Servers
Lots
And
Lots
:(
A sea of policies
- fleet wide savings policies
- off hours stops for dev environments
- garbage collect ebs, elb, etc
- Detect over-provisioned resources
- numerous security policies
- Encrypt all the Things
- Access Control
- ssl ciphers
- numerous compliance policies
- tag compliance / chargeback
- current images
- backups
Source
Fleet Management
Across Lots of federated accounts.
Natural tendency
- One off scripts
-
But
- How are they implemented
- How are they deployed
- How are they configured
- How are they managed
- Who owns them
Software Engineering
- How are they Tested
- Are they Reviewed
Who Knows? Source
Cloud Custodian
•A rules engine for infrastructure management.
•YAML DSL for policies based on query
resources or subscribe to events, apply filters,
take actions.
Integrated Lambda provisioning and event
sources.
•Outputs to Amazon S3, Amazon Cloud Watch
Logs, Amazon Cloud Watch Metrics
Opensource @ https://github.
com/capitalone/cloud-custodian
- name: require-rds-encrypt-and-non-public
resource: rds
mode:
- type: cloudtrail
- events:
- CreateDBInstance
filters:
- or:
- Encrypted: false
- PubliclyAvailable: true
actions:
- type: delete
skip-snapshot: true
Amazon Cloud Watch Events
Features
● Powerful infrastructure observation
capabilities
● Enables “realtime” rules enforcement and
reaction with wide coverage of AWS
product APIs.
Sources
● All Cloud Trail Events (P99 @ 90s delivery
window as of April 2016)
● EC2 instance state changes (600ms)
● ASG instance membership changes
(600ms)
● Periodic Scheduling (custom)
● Custom events
Cloud Custodian
Resource type policies (ec2 instance,
ami, auto scale group, bucket, elb, etc).
Filter resources
Invoke actions on filtered set
Output resource json to s3, metrics to
cloudwatch
Vocabularies of actions, and filters for
policy construction.
- name: ebs-copy-instance-tags
resource: ebs
filters:
- type: value
key: "Attachments[0].Device"
value: not-null
actions:
- type: copy-instance-tags
tags:
- App
- Env
- Owner
- Name
Filtering resources
Generic Value filter
- Jmespath expressions on
resource’s json representation
- Lots of operator matching (in,
not-in, absent, not-null, gte,
regex, etc)
Arbitrary nesting of filters with ‘or’
and ‘and’ blocks.
Simple key/value are equality
matches with value expressions
- type: value
# Ignore keys that start with
# 'aws:' as they don't count towards the limit.
Key: "[length(Tags[?!starts_with(Key,'aws:')])][0]"
op: less-than
value: 10
- or:
- “tag:App”: absent
- “tag:Env”: absent
- and:
- Encrypted: false
Multi Step Workflows
“Poorly tagged
instances, should be
stopped in 1 day, and
then terminated in 3”
- mark-for-op
- marked-for-op
Chain together multiple
policies.
- name: ec2-tag-compliance-mark
resource: ec2
description: |
Find all non-compliant tag
instances for stoppage in 1 days.
mode:
type: periodic
schedule: rate(1 day)
filters:
- "tag:maid_status": absent
- or:
- "tag:App": absent
- "tag:Env": absent
- "tag:Owner": absent
actions:
- type: mark-for-op
op: stop
days: 1
- name: ec2-tag-compliance-stop
resource: ec2
description: |
Stop poorly tagged and schedule
Terminate.
mode:
type: periodic
schedule: rate(1 day)
filters:
- type: marked-for-op
op: stop
- or:
- "tag:App": absent
- "tag:Env": absent
- "tag:Owner": absent
actions:
- stop
- type: mark-for-op
op: terminate
days: 4
Custodian Vocabularies
asg:
actions:
- delete
- mark-for-op
- rename-tag
- suspend
- tag
- remove-tag
- resume
propagate-tags
filters:
- vpc-id
- time
- marked-for-op
- not-encrypted
- image-age
- onhour
- tag-count
- offhour
- launch-config
ec2:
actions:
- mark-for-op
- remove-tag
- snapshot
- tag
- start
- tag-trim
- stop
- terminate
filters:
- ebs
- marked-for-op
- ephemeral
- image
- instance-age
- onhour
- tag-count
- offhour
- image-age
s3:
actions:
- attach-encrypt
- remove-statements
- encrypt-keys
- encryption-policy
- delete-global-grants
filters:
- missing-statement
- global-grants
- is-log-target
- has-statement
Additional resource
types
- RDS
- ELB
- Redshift
- CloudFormation
- AMI
- EBS
- EBS Snapshot
Metrics
Resource Count
Action Time
Query/Filter Time
Custom
Example Policy - Amazon S3 Encryption
Require encryption for objects
name: s3-require-encryption
resource: s3
description: |
Apply encryption required policy to new buckets
mode:
type: cloudtrail
events:
- CreateBucket
actions:
- encryption-policy
- encrypt-keys
Find elb/s3 logs sinks and switch to lambda
encrypt
name: s3-remediate
resource: s3
description: |
Encryption required policy
mode:
type: periodic
schedule: rate(1 day)
filters:
- type: is-log-target
actions:
- attach-encrypt
- type: remove-statements
statement_ids:
- RequireEncryptedPutObject
Roadmap
- Elastic search indexing of records / outputs (programmatic dashboards /
historical trending)
- Flourish ??
- Cross Language support (lambda invoke actions)
- Moar filters/actions/resources
https://github.com/capitalone/cloud-custodian/milestones
Incidentally, We’re Hiring ;-)

Contenu connexe

Tendances

AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineJulien SIMON
 
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon Web Services
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessAmazon Web Services
 
(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep Dive(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep DiveAmazon Web Services
 
Introduction to Amazon Kinesis Firehose - AWS August Webinar Series
Introduction to Amazon Kinesis Firehose - AWS August Webinar SeriesIntroduction to Amazon Kinesis Firehose - AWS August Webinar Series
Introduction to Amazon Kinesis Firehose - AWS August Webinar SeriesAmazon Web Services
 
Introduction to Amazon Elasticsearch Service
Introduction to  Amazon Elasticsearch ServiceIntroduction to  Amazon Elasticsearch Service
Introduction to Amazon Elasticsearch ServiceAmazon Web Services
 
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018Amazon Web Services Korea
 
Azure Monitoring Overview
Azure Monitoring OverviewAzure Monitoring Overview
Azure Monitoring Overviewgjuljo
 
Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Amazon Web Services
 
Centralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackRich Lee
 

Tendances (20)

What is AWS Glue
What is AWS GlueWhat is AWS Glue
What is AWS Glue
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
Introduction to AWS Glue
Introduction to AWS GlueIntroduction to AWS Glue
Introduction to AWS Glue
 
BDA311 Introduction to AWS Glue
BDA311 Introduction to AWS GlueBDA311 Introduction to AWS Glue
BDA311 Introduction to AWS Glue
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and Serverless
 
(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep Dive(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep Dive
 
AWS Tagging Strategy
AWS Tagging StrategyAWS Tagging Strategy
AWS Tagging Strategy
 
Introduction to Amazon Kinesis Firehose - AWS August Webinar Series
Introduction to Amazon Kinesis Firehose - AWS August Webinar SeriesIntroduction to Amazon Kinesis Firehose - AWS August Webinar Series
Introduction to Amazon Kinesis Firehose - AWS August Webinar Series
 
Auto Scaling on AWS
Auto Scaling on AWSAuto Scaling on AWS
Auto Scaling on AWS
 
Introduction to Amazon Elasticsearch Service
Introduction to  Amazon Elasticsearch ServiceIntroduction to  Amazon Elasticsearch Service
Introduction to Amazon Elasticsearch Service
 
Amazon EBS: Deep Dive
Amazon EBS: Deep DiveAmazon EBS: Deep Dive
Amazon EBS: Deep Dive
 
ElastiCache & Redis
ElastiCache & RedisElastiCache & Redis
ElastiCache & Redis
 
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
실전 프로젝트로 이야기하는 AWS IoT::김민성::AWS Summit Seoul 2018
 
Azure Monitoring Overview
Azure Monitoring OverviewAzure Monitoring Overview
Azure Monitoring Overview
 
AWS RDS
AWS RDSAWS RDS
AWS RDS
 
Cost optimization on AWS
Cost optimization on AWSCost optimization on AWS
Cost optimization on AWS
 
Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS
 
Centralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stack
 

Similaire à AWS Fleet Management with Cloud Custodian

How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINXWallarm
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing3S Labs
 
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...Amazon Web Services
 
Tracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingTracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingHemant Kumar
 
DevOps and the Future of Enterprise Security
DevOps and the Future of Enterprise SecurityDevOps and the Future of Enterprise Security
DevOps and the Future of Enterprise SecurityPriyanka Aash
 
Security Architecture recommendations for your new AWS operation - Pop-up Lof...
Security Architecture recommendations for your new AWS operation - Pop-up Lof...Security Architecture recommendations for your new AWS operation - Pop-up Lof...
Security Architecture recommendations for your new AWS operation - Pop-up Lof...Amazon Web Services
 
Cloud inventory analytics Maestro server
Cloud inventory analytics   Maestro serverCloud inventory analytics   Maestro server
Cloud inventory analytics Maestro serverFelipe Klerk Signorini
 
OnCrawl ElasticSearch Meetup France #12
OnCrawl ElasticSearch Meetup France #12OnCrawl ElasticSearch Meetup France #12
OnCrawl ElasticSearch Meetup France #12Cogniteev
 
Oncrawl elasticsearch meetup france #12
Oncrawl elasticsearch meetup france #12Oncrawl elasticsearch meetup france #12
Oncrawl elasticsearch meetup france #12Tanguy MOAL
 
A Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsA Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsAndreas Grabner
 
AWS Observability Made Simple
AWS Observability Made SimpleAWS Observability Made Simple
AWS Observability Made SimpleLuciano Mammino
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsLewis Ardern
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015Leslie Carr
 
You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...
You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...
You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...Amazon Web Services
 
StackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackStackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackChiradeep Vittal
 
Best Practices for SecOps on AWS
Best Practices for SecOps on AWSBest Practices for SecOps on AWS
Best Practices for SecOps on AWSAmazon Web Services
 
Addressing Amazon Inspector Assessment Findings - September 2016 Webinar Series
Addressing Amazon Inspector Assessment Findings - September 2016 Webinar SeriesAddressing Amazon Inspector Assessment Findings - September 2016 Webinar Series
Addressing Amazon Inspector Assessment Findings - September 2016 Webinar SeriesAmazon Web Services
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
DevOps sensors 360° high availability in the cloud
DevOps sensors 360°   high availability in the cloudDevOps sensors 360°   high availability in the cloud
DevOps sensors 360° high availability in the cloudLahav Savir
 

Similaire à AWS Fleet Management with Cloud Custodian (20)

How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing
 
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
 
Tracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingTracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracing
 
DevOps and the Future of Enterprise Security
DevOps and the Future of Enterprise SecurityDevOps and the Future of Enterprise Security
DevOps and the Future of Enterprise Security
 
Security Architecture recommendations for your new AWS operation - Pop-up Lof...
Security Architecture recommendations for your new AWS operation - Pop-up Lof...Security Architecture recommendations for your new AWS operation - Pop-up Lof...
Security Architecture recommendations for your new AWS operation - Pop-up Lof...
 
Cloud inventory analytics Maestro server
Cloud inventory analytics   Maestro serverCloud inventory analytics   Maestro server
Cloud inventory analytics Maestro server
 
OnCrawl ElasticSearch Meetup France #12
OnCrawl ElasticSearch Meetup France #12OnCrawl ElasticSearch Meetup France #12
OnCrawl ElasticSearch Meetup France #12
 
Oncrawl elasticsearch meetup france #12
Oncrawl elasticsearch meetup france #12Oncrawl elasticsearch meetup france #12
Oncrawl elasticsearch meetup france #12
 
A Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsA Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOps
 
AWS Observability Made Simple
AWS Observability Made SimpleAWS Observability Made Simple
AWS Observability Made Simple
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015
 
You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...
You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...
You Can’t Protect What You Can’t See: AWS Security Monitoring & Compliance Va...
 
StackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackStackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStack
 
Best Practices for SecOps on AWS
Best Practices for SecOps on AWSBest Practices for SecOps on AWS
Best Practices for SecOps on AWS
 
Addressing Amazon Inspector Assessment Findings - September 2016 Webinar Series
Addressing Amazon Inspector Assessment Findings - September 2016 Webinar SeriesAddressing Amazon Inspector Assessment Findings - September 2016 Webinar Series
Addressing Amazon Inspector Assessment Findings - September 2016 Webinar Series
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
AWS glue technical enablement training
AWS glue technical enablement trainingAWS glue technical enablement training
AWS glue technical enablement training
 
DevOps sensors 360° high availability in the cloud
DevOps sensors 360°   high availability in the cloudDevOps sensors 360°   high availability in the cloud
DevOps sensors 360° high availability in the cloud
 

Plus de ServerlessConf

Paul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last YearPaul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last YearServerlessConf
 
Tomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - WebtaskalifragilistexpialidociousTomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - WebtaskalifragilistexpialidociousServerlessConf
 
Charity Hound - Serverless, NoOps, The Tooth Fairy
Charity Hound - Serverless, NoOps, The Tooth FairyCharity Hound - Serverless, NoOps, The Tooth Fairy
Charity Hound - Serverless, NoOps, The Tooth FairyServerlessConf
 
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless StartupSam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless StartupServerlessConf
 
Ryan Brown - Open Community
Ryan Brown - Open CommunityRyan Brown - Open Community
Ryan Brown - Open CommunityServerlessConf
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...ServerlessConf
 
Paul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last YearPaul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last YearServerlessConf
 
Patrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to ServicefullPatrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to ServicefullServerlessConf
 
Noelle La Charite - Building Voice Experiences
Noelle La Charite - Building Voice ExperiencesNoelle La Charite - Building Voice Experiences
Noelle La Charite - Building Voice ExperiencesServerlessConf
 
Lars Trierloff - Serverless Adventures with AWS Lambda and Clojure
Lars Trierloff - Serverless Adventures with AWS Lambda and ClojureLars Trierloff - Serverless Adventures with AWS Lambda and Clojure
Lars Trierloff - Serverless Adventures with AWS Lambda and ClojureServerlessConf
 
Joe Emison - 10X Product Development
Joe Emison - 10X Product DevelopmentJoe Emison - 10X Product Development
Joe Emison - 10X Product DevelopmentServerlessConf
 
Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...
Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...
Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...ServerlessConf
 
Eric Windisch - Building Composable Serverless Apps
Eric Windisch - Building Composable Serverless AppsEric Windisch - Building Composable Serverless Apps
Eric Windisch - Building Composable Serverless AppsServerlessConf
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksServerlessConf
 
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsChris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsServerlessConf
 
Ben Kehoe - Serverless Architecture for the Internet of Things
Ben Kehoe - Serverless Architecture for the Internet of ThingsBen Kehoe - Serverless Architecture for the Internet of Things
Ben Kehoe - Serverless Architecture for the Internet of ThingsServerlessConf
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...ServerlessConf
 

Plus de ServerlessConf (17)

Paul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last YearPaul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last Year
 
Tomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - WebtaskalifragilistexpialidociousTomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - Webtaskalifragilistexpialidocious
 
Charity Hound - Serverless, NoOps, The Tooth Fairy
Charity Hound - Serverless, NoOps, The Tooth FairyCharity Hound - Serverless, NoOps, The Tooth Fairy
Charity Hound - Serverless, NoOps, The Tooth Fairy
 
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless StartupSam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
Sam Kroonenburg and Pete Sbarski - The Story of a Serverless Startup
 
Ryan Brown - Open Community
Ryan Brown - Open CommunityRyan Brown - Open Community
Ryan Brown - Open Community
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
 
Paul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last YearPaul Johnston - What I Wish I'd Known Last Year
Paul Johnston - What I Wish I'd Known Last Year
 
Patrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to ServicefullPatrick Debois - From Serverless to Servicefull
Patrick Debois - From Serverless to Servicefull
 
Noelle La Charite - Building Voice Experiences
Noelle La Charite - Building Voice ExperiencesNoelle La Charite - Building Voice Experiences
Noelle La Charite - Building Voice Experiences
 
Lars Trierloff - Serverless Adventures with AWS Lambda and Clojure
Lars Trierloff - Serverless Adventures with AWS Lambda and ClojureLars Trierloff - Serverless Adventures with AWS Lambda and Clojure
Lars Trierloff - Serverless Adventures with AWS Lambda and Clojure
 
Joe Emison - 10X Product Development
Joe Emison - 10X Product DevelopmentJoe Emison - 10X Product Development
Joe Emison - 10X Product Development
 
Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...
Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...
Frederic Lavigne and Stephen Fink - Serverless Video Processing with IBM Blue...
 
Eric Windisch - Building Composable Serverless Apps
Eric Windisch - Building Composable Serverless AppsEric Windisch - Building Composable Serverless Apps
Eric Windisch - Building Composable Serverless Apps
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
 
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsChris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
 
Ben Kehoe - Serverless Architecture for the Internet of Things
Ben Kehoe - Serverless Architecture for the Internet of ThingsBen Kehoe - Serverless Architecture for the Internet of Things
Ben Kehoe - Serverless Architecture for the Internet of Things
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
 

Dernier

NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 

Dernier (17)

Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 

AWS Fleet Management with Cloud Custodian

  • 4. We still have Servers Lots And Lots :(
  • 5. A sea of policies - fleet wide savings policies - off hours stops for dev environments - garbage collect ebs, elb, etc - Detect over-provisioned resources - numerous security policies - Encrypt all the Things - Access Control - ssl ciphers - numerous compliance policies - tag compliance / chargeback - current images - backups Source
  • 6. Fleet Management Across Lots of federated accounts. Natural tendency - One off scripts - But - How are they implemented - How are they deployed - How are they configured - How are they managed - Who owns them Software Engineering - How are they Tested - Are they Reviewed Who Knows? Source
  • 7. Cloud Custodian •A rules engine for infrastructure management. •YAML DSL for policies based on query resources or subscribe to events, apply filters, take actions. Integrated Lambda provisioning and event sources. •Outputs to Amazon S3, Amazon Cloud Watch Logs, Amazon Cloud Watch Metrics Opensource @ https://github. com/capitalone/cloud-custodian - name: require-rds-encrypt-and-non-public resource: rds mode: - type: cloudtrail - events: - CreateDBInstance filters: - or: - Encrypted: false - PubliclyAvailable: true actions: - type: delete skip-snapshot: true
  • 8. Amazon Cloud Watch Events Features ● Powerful infrastructure observation capabilities ● Enables “realtime” rules enforcement and reaction with wide coverage of AWS product APIs. Sources ● All Cloud Trail Events (P99 @ 90s delivery window as of April 2016) ● EC2 instance state changes (600ms) ● ASG instance membership changes (600ms) ● Periodic Scheduling (custom) ● Custom events
  • 9. Cloud Custodian Resource type policies (ec2 instance, ami, auto scale group, bucket, elb, etc). Filter resources Invoke actions on filtered set Output resource json to s3, metrics to cloudwatch Vocabularies of actions, and filters for policy construction. - name: ebs-copy-instance-tags resource: ebs filters: - type: value key: "Attachments[0].Device" value: not-null actions: - type: copy-instance-tags tags: - App - Env - Owner - Name
  • 10. Filtering resources Generic Value filter - Jmespath expressions on resource’s json representation - Lots of operator matching (in, not-in, absent, not-null, gte, regex, etc) Arbitrary nesting of filters with ‘or’ and ‘and’ blocks. Simple key/value are equality matches with value expressions - type: value # Ignore keys that start with # 'aws:' as they don't count towards the limit. Key: "[length(Tags[?!starts_with(Key,'aws:')])][0]" op: less-than value: 10 - or: - “tag:App”: absent - “tag:Env”: absent - and: - Encrypted: false
  • 11. Multi Step Workflows “Poorly tagged instances, should be stopped in 1 day, and then terminated in 3” - mark-for-op - marked-for-op Chain together multiple policies. - name: ec2-tag-compliance-mark resource: ec2 description: | Find all non-compliant tag instances for stoppage in 1 days. mode: type: periodic schedule: rate(1 day) filters: - "tag:maid_status": absent - or: - "tag:App": absent - "tag:Env": absent - "tag:Owner": absent actions: - type: mark-for-op op: stop days: 1 - name: ec2-tag-compliance-stop resource: ec2 description: | Stop poorly tagged and schedule Terminate. mode: type: periodic schedule: rate(1 day) filters: - type: marked-for-op op: stop - or: - "tag:App": absent - "tag:Env": absent - "tag:Owner": absent actions: - stop - type: mark-for-op op: terminate days: 4
  • 12. Custodian Vocabularies asg: actions: - delete - mark-for-op - rename-tag - suspend - tag - remove-tag - resume propagate-tags filters: - vpc-id - time - marked-for-op - not-encrypted - image-age - onhour - tag-count - offhour - launch-config ec2: actions: - mark-for-op - remove-tag - snapshot - tag - start - tag-trim - stop - terminate filters: - ebs - marked-for-op - ephemeral - image - instance-age - onhour - tag-count - offhour - image-age s3: actions: - attach-encrypt - remove-statements - encrypt-keys - encryption-policy - delete-global-grants filters: - missing-statement - global-grants - is-log-target - has-statement Additional resource types - RDS - ELB - Redshift - CloudFormation - AMI - EBS - EBS Snapshot
  • 14. Example Policy - Amazon S3 Encryption Require encryption for objects name: s3-require-encryption resource: s3 description: | Apply encryption required policy to new buckets mode: type: cloudtrail events: - CreateBucket actions: - encryption-policy - encrypt-keys Find elb/s3 logs sinks and switch to lambda encrypt name: s3-remediate resource: s3 description: | Encryption required policy mode: type: periodic schedule: rate(1 day) filters: - type: is-log-target actions: - attach-encrypt - type: remove-statements statement_ids: - RequireEncryptedPutObject
  • 15.
  • 16. Roadmap - Elastic search indexing of records / outputs (programmatic dashboards / historical trending) - Flourish ?? - Cross Language support (lambda invoke actions) - Moar filters/actions/resources https://github.com/capitalone/cloud-custodian/milestones