By the end of this training
you will be able to script and automate AWS services
using AWS Tools for Windows PowerShell.
Write your own self-healing PowerShell scripts.
After this brief video, please take the hands-on lab
at https://run.qwiklabs.com
Hi Jen.
I've recently moved a few Windows based applications to AWS,
and I was wondering whether I could script
some of my deployment and maintenance tasks using PowerShell.
Hi John, I'm glad you asked.
Yes, AWS provides just what you need
with the AWS Tools for Windows PowerShell.
You can automate many AWS services through your PowerShell scripts.
This becomes very handy for Windows administrators,
because they can manage their AWS resources
with the same Windows PowerShell tools they're used to.
Fantastic. So what can I do with these tools?
In short, you can deploy, manage and scale
most of the AWS services you use through PowerShell.
AWS Tools for Windows PowerShell
supports over two dozen AWS services,
including most of the common ones we use everyday
such as Amazon EC2,
RDS, S3, Elastic Load balancing, and AWS CloudFormation.
In addition, AWS Tools also supports the CloudWatch
and Amazon SNS services.
This means you can write your own self-healing PowerShell script
if any service or application fails
and an action should be taken automatically.
Let me give you an example.
A PowerShell script captures an SNS notification
when the backup operation of a database fails
due to low storage space.
And, further, it automatically increases the storage size
in the Amazon EC2 instance running the database
and runs the backup operations again.
Finally, it also emails the administrators about the issue
and the resolution steps that were taken.
That sounds fascinating.
But how is security and access control
managed for these scripts?
That's a good question, John.
I know the first concern most of us have about such scripts is
how are they going to access the AWS services
with the right access credentials?
And how can someone manage the access rights
so that these scripts are not misused or used without authority?
All cmdlets in the PowerShell tools can work with AccessKey,
SecureKey, and Token parameters.
The Token parameter is only used when the AccessKey and SecureKey
are temporary credentials obtained from the AWS Security Token Service.
These parameters allow you to specify credentials
for AWS Identity and Access Management user accounts
that you have created.
The credentials can be given restricted access
to AWS resources and services.
Using these parameters to pass your root account credentials
to PowerShell cmdlets is less secure and not recommended.
That's why Amazon strongly recommends
that you use IAM user accounts instead.
With IAM user accounts,
you can provide specific rights to specific users,
limiting them to perform only certain tasks.
And now we can also integrate IAM with Windows ADFS through SAML.
This makes user and access management seamless
in a Windows environment.
Who do you think should use this?
Anyone who manages a Windows Server on AWS
should consider using these cmdlets.
This not only helps you manage certain regular tasks
by firing simple commands or scripts,
but it also helps you automate most of your maintenance operations
through scheduled PowerShell scripts.
That was a lot of useful info Jen.
I'm going to download
the AWS Tools for Windows PowerShell right away
and give it a try.
The hands-on lab on "AWS Tools for Windows PowerShell: Getting Started"
will enable you to set up a Windows Server instance on Amazon EC2
and install AWS Tools for Windows PowerShell.
Set up an AccessKey-based authentication.
Create, modify, and delete a new Amazon EC2 instance
using the cmdlets running in PowerShell ISE.
Set up token-based authentication.
Handle events in PowerShell
and send notifications using Amazon SNS.
Please complete the hands-on lab for this video
at https://run.qwiklabs.com