In this session… Introduce what we’re talking about - AWS and PowerShell - Cloud and on-premise infrastructure management with AWS Systems Manager
AWS Tools for PowerShell AWSPowerShell module Supports PowerShell v2-v5 on Windows AWSPowerShell.NetCore module Supports PowerShell v6 on Windows, MacOS and Linux Both support over 4400+ APIs across 125 AWS services Both available on the PowerShell Gallery NEW! PowerShell module for use with AWS Lambda: AWSLambdaPSCore Broad support for Windows platforms (server and desktop) Server support currently extends as far back as Windows Server 2003 Cmdlet support between the two editions is high; currently only a handful of cmdlets not in NetCore module (which we’re looking at) Extensive AWS API coverage Recently launched module enabling use of PowerShell scripts in AWS Lambda
Demo Getting Started with the AWS Tools for PowerShell Quick 5 min demo: install, configure and discover
AWS Systems Manager AWS Systems Manager is an operational control tool built to help you manage infrastructure both in AWS and on premises. Tools target work around: Automation State management Security and auditing Data visualization Brief overview of the service and why you might want to use it Can handle management across cloud and on-premise infrastructure Sub-services which we’ll introduce next
AWS Systems Manager: Parameter Store Allows you to collect and store configuration in one secure location Includes some configuration management tools like tagging and hierarchies. Integrated with AWS KMS for automatic encryption of configuration data at rest Quickly discover latest Windows image (AMI) ID
Demo Using Parameter Store from PowerShell Show how to access and set parameters, including hierarchies Show how to find the latest Windows image IDs (should also mention Get-EC2ImageByName)
AWS Systems Manager: Run Command Replaces the need for SSH, bastion hosts, or remote PowerShell All actions recorded by AWS CloudTrail Automate and execute Bash and PowerShell scripts across your fleet of servers
Demo What is a Run Command document? Just want to take a quick look at the overall structure of a document Use the console to show some built-in docs Can start either built-in doc or an ad-hoc document from PowerShell command line
AWS Systems Manager: State Manager Provides tools to maintain configuration consistency across your fleet of servers Supports using Ansible playbooks directly from GitHub or Amazon S3, scripts, PowerShell modules, or configuration through the AWS Console You can set the frequency and time at which State Manager will apply your configurations
AWS Systems Manager: Automation Create documents defining a collection of operation or management tasks to apply to your fleet of servers Automate execution of these tasks based on Amazon CloudWatch events or through the AWS Console, CLI, SDK, or Tools for PowerShell Optionally track and require approval for each step of your automation
What are we going to build and manage today? Discussion of the upcoming demo HR onboarding system for developers When new employee is on-boarded a workflow is started that constructs a developer desktop appropriate to their role (web deb, db admin etc) Dev desktop is an EC2 instance constructed from a vanilla EC2 image; no prior customization needed Customization is done using Systems Manager automation and configuration documents We’ll simulate the AD event noting a new user with a PowerShell script running in Lambda
Demo Our running system Show the running system and trigger the workflow for a new employee Also show a graphic of the architecture?
How it was built Let’s get started! Parameter Store to get the ID of the latest EC2 Windows image (AMI) to start from Collection of Automation documents perform the configuration Workflow triggered from Lambda function written in PowerShell State Manager used to control configuration drift over time Let’s get started! Segue into major demo showing the component pieces coming together from pre
How else could we have built the system? Compare/contrast discussion of other approaches CloudFormation CDK …Console clicks!
Summary .NET on AWS: https://aws.amazon.com/net PowerShell Gallery https://www.powershellgallery.com/packages/AWSPowerShell/ https://www.powershellgallery.com/packages/AWSPowerShell.NetCore/ AWS Systems Manager Documents on GitHub https://github.com/awslabs/aws-systems-manager/tree/master/Documents/ Blog: https://aws.amazon.com/blogs/developer/category/programing-language/dot-net/ Follow us on Twitter! @awscloud @awsfornet @amsxbg @bellevuesteve Go through all the things we learned
Thank You!