36
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Taylor Anderson Senior Product Manager, Amazon EC2 Amjad Hussain Senior Manager, Amazon EC2 December 2, 2016 How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities WIN401

AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Embed Size (px)

Citation preview

Page 1: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Taylor Anderson

Senior Product Manager, Amazon EC2

Amjad Hussain

Senior Manager, Amazon EC2

December 2, 2016

How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management

Capabilities

WIN401

Page 2: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

What to Expect from the Session

Learn how to:

• Automate AMI building and deployment

• Monitor fleet configuration and inventory

• Ensure instances are patch compliant

Page 3: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

What we heard from customers

• Traditional IT tools not built for the cloud

• Managing resources at scale is difficult

• Lack of visibility into configuration and

execution history

• Multiple vendors; complex licensing

Managing cloud and hybrid environments using

traditional tools is complex and costly

Page 4: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Introducing Amazon EC2 Systems Manager

A set of capabilities that enable automated configuration and

ongoing management of systems at scale, across all your

Windows and Linux workloads, running in Amazon EC2 or

on-premises

Page 5: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Systems Manager Capabilities

Run Command Maintenance

Windows

Inventory

State Manager Parameter Store

Patch Manager

Automation

Configuration,

Administration

Update and

TrackShared

Capabilities

Page 6: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation

Page 7: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation – What we heard

Automation pain point: AMI building

• Triggers: patching, hardening, application bake-in

• Never-ending

• Time consuming, especially when builds fail

• Overhead of maintaining build service

Page 8: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation

Introducing Automation

• Simplified automation solution

• Perfect for AMI updates, instance deployment & config

• Pro-active event notifications

• AWS optimized (EC2 Run Command, AWS Lambda, AWS

CloudTrail, IAM, and Amazon CloudWatch integrations)

Page 9: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation – Getting Started

1. Create an

automation

document

2. Run automation 3. Monitor your

automation

Page 10: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation

Demo

Page 11: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation - Documents

Input & output parameters

• Create default values, or assign at run-time

• Parameter Store integration

• System Variables (DATE, DATE_TIME, REGION,

EXECUTION_ID)

Demo examples

Document

Parameter Name

Default Value

sourceAMIid “{{ssm:sourceAMI}}”

targetAMIname “patchedAMI-{{global:DATE_TIME}}”

Page 12: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation - Documents

Automation Steps

• Action types:

• runInstances, changeInstanceState, createAMI

• runCommand, invokeLambdaFunction

• Flow control: retries, timeouts, continue/abort

Public Automation Documents

• AWS-UpdateWindowsAmi

• AWS-UpdateLinuxAmi

Page 13: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation – IAM Setup

1. Create a Service Role for Automation

• Permission for Automation service to operate in your account

2. Attach PassRole policy to user’s account

3. Launch instances with SSM role (AmazonEC2RoleforSSM)

Page 14: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Automation – Monitoring

• Amazon CloudWatch Events

• Publish notifications to an Amazon SNS topic

• Step-level & automation-level notifications

Page 15: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory

Page 16: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory

What we heard:

• Accurate software inventory is critical for understanding fleet

configuration and license usage

• Legacy solutions not optimized for cloud

• Self-hosting requires additional overhead

Page 17: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory

Introducing Inventory

• End-to-end inventory collection (EC2/on-premises/Workspaces)

• Windows/Linux

• Powerful query

• Extensible inventory schema

• Integrated with AWS services

Page 18: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory – System Diagram

SSMAgent

EC2

Windows

Instance

SSMAgent

EC2

Linux

Instance

SSMAgent

On-

Premises

Instance

AWS SSM Service

State Manager

EC2 Inventory

SSM document

Inventory

Store

EC2 Console,

SSM CLI/APIs

AWS Config

AWS Config

Console + CLI/APIs

Page 19: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory – Getting Started

1. Configure Inventory

policy

2. Apply Inventory

policy

3. Query inventory

Page 20: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory

Demo

Page 21: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory – Configuration

Create an Inventory association

1. Select instances (by instance ID or tag)

2. Select scan frequency (hours, minutes, days, NOW)

3. Select Inventory Types to gather

• Instance information

• Applications

• AWS Components

• Network configuration

• Windows Updates

• Custom Inventory

Page 22: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory – Custom Inventory Type

Custom Inventory Collection

• Extensible: record any attribute for a given instance

• Examples: rack location, BIOS version, firewall settings

Two ways to record custom inventory types

1. Agent/on-instance: Write a cron job to record custom

inventory files to a predefined path

2. API: Use PutInventory API

Page 23: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Inventory Manager

Query

• Search by inventory attribute

• Partial and inverse searches

• Windows 2012 r2 instances running SQL Server 2016 where

Windows Update KB112342 is not installed

Integration with AWS Config

• Record inventory changes over time

• Use AWS Config Rules to monitor changes, notify

• Meet compliance and governance mandates

Page 24: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager

Page 25: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager

What we heard about patching enterprise systems:

• Time consuming, tedious, repetitive

• Existing solutions are inadequate

• Enterprise patching is manual and complex

• Errors result in downtime, compliance issues

Page 26: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager

Announcing Patch Manager

• End-to-End Patching

• Easy to Automate

• Integrated with other AWS Services

• First release: Windows OS patching

Page 27: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager – Getting Started

1. Create a Patch

Baseline to define

approved patches

3. Maintenance

Window executes

patching

4. Audit results

with Patch

Compliance

2. Create a

Maintenance Window

to schedule patching for

a set of instances

Page 28: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager - Overview

Instance A

Patch Group:Prod

Patch Baseline

- Critical, High

- 5 days or older

1

Maintenance Window

- Sundays @ 1AM

- 2 hrs. long

- Task: Patching

2 3

Patch Compliance

2up to

date

0missing

updates

1error

4

Instance B

Patch Group:Prod Patch Group:Prod

Page 29: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager – Patch Baseline

• Auto-approval rules for patches

• Rule criteria

• Product (WS2012 R2)

• MSRC Classification (Critical)

• Approve After (5 days)

• Approved and Rejected patches (KB2032276, KB2124261)

• Register target instances using Patch Group tags

• Example: For Patch Group:Prod instances, approve all Critical

updates for Windows Server 2012 R2 5 days after release, except for

KB2032276

Page 30: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager – Maintenance Window

• Define and control when disruptive operations occur

• Schedule (2nd Tuesday of the month)

• Duration

• Target instances (tags or instance IDs)

• Tasks (Run Command)

Patch task uses Run Command with AWS-ApplyPatchBaseline

max instances to patch at a time, error threshold

Page 31: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager – Patching your instances

• Register the instances you want to patch as targets

• Register the AWS-ApplyPatchBaseline command as a

task

• Patching will happen during maintenance window

• Patch compliance data collected

Page 32: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager – Patch Compliance

• Fleet-wide summary of patch status

• Dashboard shows counts of compliant and non-compliant

instances

Page 33: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Patch Manager

Demo!

Page 34: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Wrapping Up

• Systems Manager available in multiple Regions

• We’d love to hear your feedback

• Join us at the booth!

Page 35: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Thank you!

Page 36: AWS re:Invent 2016: How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud with AWS Management Capabilities (WIN401)

Remember to complete

your evaluations!