[Music]
hi I'm Steve from Amazon Web Services in
this video we're going to take a look at
how to get started using the AWS tools
for visual studio team services we're
going to walk through a typical install
and then how to configure your
environment to start using the tasks
we'll also examine each of the tasks
currently available and explain why you
might use them as the tools are
open-source we'll also take a quick look
at the github repository before we start
for the benefit of new users or users
who are simply curious about the tools
and wondering what they offer let's
briefly explain what they are and why
you might want to use them if you're an
existing user of Visual Studio Team
services or VST s for short or team
foundation server then you likely have
invested in build and release pipelines
for your projects for these pipelines
you're looking for a way to reach out to
AWS services without any complex
scripting or custom code these tools are
perfect for this scenario the tools
contain a set of tasks that can be used
in build and release pipelines in both
vision studio team services and team
foundation server to interact with a
number of AWS services we'll take a look
at each of the available tasks later in
this video but for now some examples of
the tasks available to you include being
able to deploy built applications to AWS
elastic beanstalk AWS code deploy and
AWS lambda you can also transfer files
and folders between your build agents
work area and Amazon s3 invoke an AWS
lambda service function or send messages
using the simple notification services
there are many more tasks available and
we'll take an outline look at each one
later in the video let's get started
with installing the tools and setting up
our environment we're going to start at
the home page for the tools
aws.amazon.com /v STS
here you can find introductory content
about the tools as well as links to
other tools for dotnet developers from
AWS the get started button will take you
directly to the download page for the
tools on the Microsoft Visual Studio
Team services marketplace you can also
install the tools by browsing to the
marketplace from within your VST S or T
FS account let's do that now
I'm using a team services online account
here selecting the browse marketplace
link in the toolbar will take me to the
V STS marketplace home page on the
marketplace you can search for the tools
perhaps by entering a WS or the name of
one of the services supported by the
tools into the search field
I can see however that the tools are
currently listed in the featured section
on the page so I'm going to select that
link that takes me to the home page for
the AWS tools in the marketplace this is
the same page that I've gotten to if I'd
selected the getting started button on
the AWS home page for the tools once at
the marketplace page for the tools the
specific buttons to start and install
can depend on how you got to the
marketplace page and whether you are
signed into the marketplace so your
experience may differ slightly from what
I'm showing here let's start the process
of installing the tools into my VST s
environment by first clicking the get it
free button if you are not signed into
the marketplace you will now be prompted
for a user ID and password I'm already
signed in so I get taken straight to the
install page and I can select whether I
want to install into one of my team
services accounts or I can download and
install into a team foundation server
instance let's select the option to
install into my online account
installation takes just a few moments
now that I have the tools installed
let's head back to my account homepage
to work with AWS services the build
agents that execute the tasks in your
build and release pipelines need
credentials in order to be able to call
AWS service API so it's important to
note that the credentials you set up are
used by the build agents executing in
your vs TS or TFS environment they are
not credentials for you or your team
members there are two ways to configure
credentials the first way is to add one
or more service endpoints to your
project a service endpoint is the
terminology used in V STS and TFS to
refer to a set of credentials for an
external service in this case the AWS
service endpoint contains the access and
secret key and optionally role data for
a user account that the tasks can use to
make calls to AWS service api's let's
take a look at the endpoint type we can
do this by going to the dashboard
Paige for a project and then from the
gear icon on the toolbar selecting the
services entry expanding the list of
endpoint types on the left of the screen
we can see an AWS entry selecting the
AWS entry starts a dialog allowing us to
configure the credentials you can see
that we give a name to the endpoint and
we also set access and secret case if
you want you can also have the tasks run
under what is known as an assumed role
by supplying the additional fields when
assume role credentials are used the
tasks request temporary credentials that
lasts for a maximum of one hour and
which are scoped to the role you specify
I'm going to click OK here to add this
new endpoint to my project you can add
as many AWS service endpoints as you
need we recommend that you create an
identity and access management user
account for your vs TS or TFS build
agents this enables you to rotate the
access and secret keys periodically as a
best practice if you are not using
assumed role credentials now we've seen
one way to set up credentials for use by
the tools I'd recommend this particular
approach if you need to setup multiple
service endpoints which you might do for
your deployment pipelines for example
deployments to dev and test environments
might use one service endpoint deploy
mr. production might use another more
restricted set of credentials it's also
possible to configure a service endpoint
when configuring a task from within the
aegis tools let's take a look at this
next I'm going to switch back to my
collection of projects on this server
next I'm going to select the build and
release link for my getting started
project will now create a new empty bill
definition
in the build definition I'm going to add
a task from the collection in the AWS
tools you can see in the list here a
variety of tasks available to us we'll
visit each task and explain what you
might use them for later in the videos
for now I'm just going to pick a task to
be added to my definition once the task
has been added you can see visual
prompts that some required data is
missing part of the missing required
data is credentials as we can see when
we click on the task you'll notice that
the credentials field is a drop down
control if I expand the control you can
see the new endpoint I created a few
moments ago selecting this would cause
the build agent to supply the
credentials associated with that
endpoint to the task when it runs we can
also create new endpoints from this page
by clicking the button labeled new this
causes the same endpoint configuration
dialog that we saw earlier to appear and
we can fill in the credential fields as
we need clicking ok adds the new
endpoint and selects it for the task
this new endpoint is also available to
all other AWS tasks we might add to
build and release definitions for this
project it's not scoped solely to this
task we've seen how to install the tools
and how to set up credentials for the
tasks to use let's move on to reviewing
each of the tasks the tools contain as
of this recording and what you might use
them for to examine the available tasks
I'm going to switch to a different build
definition where I've already added each
task let's start our overview with the
two command line tool tasks this task
can be used to run commands using the
AWS CLI here you can see a sample set up
to run the describe instances command
for ec2 note that before using this task
you need to install the AWS CLI onto the
machine on which the build agent is
running refer to the AWS documentation
for the CLI for instructions on how to
do this for different platforms next we
have a task for grunt commands in the
AWS tools for Windows PowerShell module
this task runs only on Windows build
agents and can run either scripts
specified in the task itself or it can
execute a script contained in a file in
the build work area unlike with the AWS
CLI this task
automatically install the AWS tools for
Windows PowerShell module if it's not
already installed on the build machine
this install step can take several
minutes however so I recommend pre
installing the module where possible
next we have three tasks for working
with cloud formation our infrastructure
provisioning service cloud formation
takes a declarative template written in
jason or gamma that describes the AWS
resources you need and creates them in
what is called a stack the first task
create or update stack operates in one
of two modes as the name suggests if the
stack exists then the task switches in
to update mode to update the existing
resources in the stack or create new
ones when the stack does not exist then
a new stack is created from the template
you can supply the template to be used
using either a file in the work area a
URL or an s3 bucket and object key
stacks can also be updated or created
using change sets a change set enables
you to preview how proposed changes
might impact your resources when a
change set is used the create or update
stack tasks can either execute it
immediately or execution can be deferred
and the change set run using the next
task executes change set as you can see
this task is very simple to configure
requiring only the name of the stack and
the change set finally for cloud
formation we have the delete stack task
this can be useful if you like to
practice immutable deployments in other
words your deployments are performed to
a fresh stack each time and you then
delete the old stack when the deployment
is completed code deploy is employment
service for deploying applications to
ec2 instances it takes the application
code to be deployed plus a Yamal
formatted control file called off spec
ml that describes the steps to install
and uninstall your application this
allows you total control of your
application is deployed onto the
instances if you'd prefer to concentrate
on your application and let AWS handle
the creation of infrastructure then you
might wish to consider elastic Beanstalk
elastic beanstalk automatically handles
the details of capacity provisioning
load balancing scaling and application
health monitoring the tools contain two
tasks for working with existing elastic
Beanstalk applications and deployed
environments
the first task enables you to take a
built application upload it to Amazon s3
and register it as the deployable
application
the TAS can handle asp.net and asp.net
core applications or you can reference
the deployment bundle already in an s3
bucket the next task can be used to
perform actual deployments to an
environment just as with the previous
tasks it can handle asp.net and asp.net
core deployments a bundle already in s3
or it can take details of a version
registered previously with the create
revision task this can be useful when
you want to deploy the same version to
multiple environments if you use the
elastic container service you can push
docker images from your build to the
elastic container registry using this
task server list users have three tasks
available to them the first tasks shown
here deploy to lambda enables you to
deploy function and service applications
built with dotnet core this includes
support for service functions and
applications using dotnet core 2.0 that
was released recently announced in AWS
lambda the second task
shown here deployed lambda function
enables deployment of code that uses any
of the language runtimes supported by
lambda
the third lambda tasks invoke lambda
function enables you to invoke a lambda
function from within your build passing
a data payload and receiving the
response back you can see you simply
supply the name of the function to
invoke and the data supply to the
function the data is supplied in JSON
format two tests are available for
working with the Amazon s3 storage
service
the first s3 download enables download
of content from an s3 bucket into the
work area for a build you can download a
single file or multiple files identified
by glob patterns you might use this to
inject content into your build that is
not held in the source code repository
the second task upload enables upload of
content from the build area to an s3
bucket again you can select single file
or multiple files identified by glob
patterns both tasks have Advanced
Options to control how folders are
processed as s3 object key names by
default they preserve any folder
hierarchy using the send message task
you can send messages from your build to
a simple notification service topic or
simple queue service queue and finally
the tails contain two tasks for Systems
Manager the first get parameter enables
you to read one or more parameters from
Systems Manager parameter store and add
them as build variables
your build parameter store is a key
value store that can handle simple named
parameters as well as path parameters
and also secure parameter values
encrypted arrests with a kms key in this
example you can see I'm reading a path
parameter a connection string for my
application which is variable depending
on a notional build stage the output
from this task will be another build
variable the tasks later in my build can
consume four secure parameters the task
automatically creates secure build
variables so the value does not appear
in any trace logs or build tasks console
output Systems Manager also has the
ability to run commands against a fleet
of ec2 instances and also on-premise
machines and we can do this with the
last task here you can see takes the
name of a command document to run which
may be custom or an Amazon provided
document parameters for the command and
also how to identify the instances or
on-premise machines against which the
command should be run that summarizes
all of the tasks currently contained in
the tools as I mentioned at the start of
this video the tools are also open
source let's take a look at the github
repository github comm slash AWS slash
AWS - VST s - tools if you're interested
in contributing new tasks then you might
like to know that the tools are written
in typescript and use the node J s SDK
for the STS for the most part they also
use the AWS SDK for node.js when
communicating with AWS although some
tools that work with dotnet core
projects such as the lambda deployment
also use a.net CLI extensions you can
also use the repository to raise issues
if you encounter problems or questions
or you can submit feature requests if a
particular service or service feature
you need isn't currently available and
of course we also welcome pull requests
let's summarize in this video we've seen
how to get started with the AWS tools
for visual studio team services we saw
how easy it is to install the tools into
our VST s or on-premise TFS environments
we then covered how to set up AWS
credentials for our tasks to use when
executed by the build agents in our
environments then we had a quick look at
each of the tasks and what we might use
them for finally we visited the github
repository for the tools
we're actively developing the tools in
collaboration with the community so if
you have a feature request feel free to
submit it or even better send us a pull
request and of course if you encounter
problems with the tools please raise an
issue in the repository so we can
investigate I hope this has been useful
thank you for watching the dotnet
learning series on AWS
[Music]