How to Specify the Amazon Security Credentials for Your Application - Amazon Toolkit for Visual Studio
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

How to Specify the Amazon Security Credentials for Your Application

The Amazon account you specify in the Publish to Elastic Beanstalk wizard is the Amazon account the wizard will use for deployment to Elastic Beanstalk.

Although not recommended, you may also need to specify Amazon account credentials that your application will use to access Amazon services after it has been deployed. The preferred approach is to specify an IAM role. In the Publish to Elastic Beanstalk wizard, you do this through the Identity and Access Management Role drop-down list on the Amazon Options page. In the legacy Publish to Amazon Web Services wizard, you do this through the IAM Role drop-down list on the Amazon Options page.

If you must use Amazon account credentials instead of an IAM role, you can specify the Amazon account credentials for your application in one of the following ways:

  • Reference a profile corresponding to the Amazon account credentials in the appSettings element of the project's Web.config file. (To create a profile, see Configuring Amazon Credentials.) The following example specifies credentials whose profile name is myProfile.

    <appSettings> <!-- Amazon CREDENTIALS --> <add key="AWSProfileName" value="myProfile"/> </appSettings>
  • If you're using the Publish to Elastic Beanstalk wizard, on the Application Options page, in the Key row of the Key and Value area, choose AmazonAccessKey. In the Value row, type the access key. Repeat these steps for AmazonSecretKey.

  • If you're using the legacy Publish to Amazon Web Services wizard, on the Application Options page, in the Application Credentials area, choose Use these credentials, and then type the access key and secret access key into the Access Key and Secret Key boxes.