.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.
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.
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.
- 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.
- In IAM select Users, and then select Add users.
- In Specify user details enter the name of a new user in Username, and then select Next.
- 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.
- In Review and create review the User details and Permissions summary, then choose Create 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.
- Navigate to IAM, select Users, then in the Users panel select the User name for the user you recently created.
- In the user window select the Security credentials tab, then select Create access key.
- In Access key best practices & alternatives select Command Line Interface (CLI), select that you understand the alternative recommendations, then select Next.
- 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.
- 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
- Install the AWS CLI.
- Configure the AWS CLI and link it to your AWS account and user with the credentials you downloaded. This creates a default AWS profile.
- 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
- 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.
- 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.
- 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.
- 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.