.NET on AWS Blog

Get started with .NET development on AWS

This post explains 3 important areas to set up in order to begin your journey with .NET development on AWS. First, create an AWS account and configure a developer user with an appropriate level of access. Second, install and configure command line tools. Lastly, download and configure the toolkit for your IDE. Many of the tools assume minimal knowledge of AWS and will guide you.

Setting up and Configuring your Amazon account

To begin creating a new account follow the steps in the knowledge center article titled: How do I create and activate a new AWS account? After your account is successfully created we recommend taking some time now or in the future to review the AWS Free Tier. The free tier enables you to explore hundreds of products and easily start your journey building on AWS. Also, consider setting up billing alerts so you are not surprised by unexpected charges.

When you log in for the first time the AWS Management Console displays default widgets for a number of criteria. At this stage you can review the introductory material in the Welcome to AWS widget or jump into configuring the console and your account.

AWS Console Home displaying default widgets.

Management Console and Security Configuration Steps

Select your region

It’s important to choose and confirm your AWS Region when you visit the console. AWS global infrastructure is grouped into regions and each service is hosted in a Region. You should change the region to the location closest to your physical location. For example, if you live in the northeast United States select us-east-1 and not us-west-2.

Region selector dropdown displaying available regions

Create a developer user

The first time you access the console you will be signed in as an administrator. Administrator access is a powerful level of access that is not appropriate for all users and use cases. To ensure that your level of access is appropriate you can create a new user in your account and apply specific permissions to that user.

  1. To create a new user in your account, use the Identity and Access Management (IAM) service, enter IAM in the search box and select IAM from the list of services.
    Services dropdown displaying search results for IAM.
  2. In IAM select Users, and then select Add users.
    Identity Access Management window adding a new user
  3. In Specify user details enter the name of a new user in Username, and then select Next.
    Window with a search box to use when specifying user details.
  4. In Set permissions select Attach policies directly, in the search box enter PowerUserAccess, and then select the appropriate checkbox and choose Next. As you work with different services you will need to add additional permissions which you can find on the service product pages.
    Note: A user with the PowerUserAccess permission performs application development tasks and can create and configure resources and services that support AWS application development. Remember to follow your organization’s security best practices and follow AWS least privilege guidelines.
    Window displaying search results when setting permissions.
  5. In Review and create review the User details and Permissions summary, then choose Create User.
    A window where you can review the user details entered and create a user.

Create and download credentials

Now that you’ve created a new user you can configure the user to have a programmatic access key and secret key. These credentials will enable the AWS CLI and other tools to access your AWS account.

  1. Navigate to IAM, select Users, then in the Users panel select the User name for the user you recently created.
  2. In the user window select the Security credentials tab, then select Create access key.
    IAM window, click create access key to create the key for your user.
  3. In Access key best practices & alternatives select Command Line Interface (CLI), select that you understand the alternative recommendations, then select Next.
    Window used to select access key best practices.
  4. In Set description tag enter an option description that details the purpose of the access keys then select Create access key. The access key and secret access keys are created.
  5. Select Download .csv file and save the file in secure location. You must save these keys in a safe place for future use.

Install and configure command line tools

When utilizing the command line, we recommend the AWS Command Line Interface (AWS CLI) which is a unified tool to manage your AWS services. The CLI is an open-source tool that enables you to interact with AWS services using commands in your command-line shell. If you prefer PowerShell, you can use AWS Tools for PowerShell.

We also recommend you install extensions to the dotnet commands for AWS and install the AWS .NET deployment tool for .NET CLI.

Follow the steps listed below to install and configure the command line tools

  1. Install the AWS CLI.
  2. Configure the AWS CLI and link it to your AWS account and user with the credentials you downloaded. This creates a default AWS profile.
    Command line window displaying AWS configure commands
  3. Install the AWS Extensions for .NET CLI. These tool extensions are focused on building dotnet (formerly .NET Core) and ASP.NET Core applications and deploying them to AWS services
  4. Install the AWS.NET deployment tool for .NET CLI. This tool simplifies deployment of .NET applications by suggesting compatible AWS compute services for your application.
  5. If you’re a PowerShell user install the AWS Tools for PowerShell.

Install and Configure AWS IDE Toolkits

AWS offers several IDE toolkits that can be used to develop, debug, and deploy to AWS products. The below steps are specific for Microsoft Visual Studio users. To see a full list of other toolkits, review the AWS IDE Toolkits section of the Tools page on the .NET on AWS Developer Center.

  1. Install the AWS Toolkit for Visual Studio. This toolkit improves development workflows by making AWS services available directly from your Visual Studio environment. This toolkit also includes the feature Publish to AWS which guides you in the publishing process.
  2. In Visual Studio go to the AWS Explorer view and select default as your AWS profile. When default is selected a list of AWS services are displayed in the AWS Explorer. You should then set the region in AWS Explorer to match the region in the AWS Management Console.

Conclusion

In this post, we showed you how to get setup with an AWS account, create a new user, and create and download credentials. We then outlined how to install and configure important command line tools and IDE toolkits. For more information on all things .NET on AWS bookmark the .NET on AWS developer center website and follow this blog and read our future posts. We encourage you to share your experience with .NET on AWS by reaching out to us at mailto:dotnet-on-aws-feedback@amazon.com.