How do I get AWS_ACCESS_KEY_ID for Amazon?

2019-03-08 12:41发布

I'm totally new to AWS.

I downloaded some sample code from Amazon and I need to set a number of constants:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • MERCHANT_ID
  • MARKETPLACE_ID

I just created an AWS account. I want some type of sandbox account so I can try out the code samples.

What are the exact steps I have to take to:

  1. Create a sandbox account
  2. Get these credentials

4条回答
等我变得足够好
2楼-- · 2019-03-08 12:47
  1. Go to: http://aws.amazon.com/
  2. Sign Up & create a new account (they'll give you the option for 1 year trial or similar)
  3. Go to your AWS account overview
  4. Account menu in the upper-right (has your name on it)
  5. sub-menu: Security Credentials
查看更多
叼着烟拽天下
3楼-- · 2019-03-08 12:47
  1. Open the AWS Console
  2. Click on your username near the top right and select My Security Credentials
  3. Click on Users in the sidebar
  4. Click on your username
  5. Click on the Security Credentials tab
  6. Click Create Access Key
  7. Click Show User Security Credentials
查看更多
做自己的国王
4楼-- · 2019-03-08 12:54

It is very dangerous to create an access_key_id in "My Account ==> Security Credentials". Because the key has all authority. Please create "IAM" user and attach only some policies you need.

查看更多
叼着烟拽天下
5楼-- · 2019-03-08 13:03

Amit's answer tells you how to get your AWS_ACCESS_KEY_ID, but the Your Security Credentials page won't reveal your AWS_SECRET_ACCESS_KEY. As this blog points out:

Secret access keys are, as the name implies, secrets, like your password. Just as AWS doesn’t reveal your password back to you if you forgot it (you’d have to set a new password), the new security credentials page does not allowing retrieval of a secret access key after its initial creation. You should securely store your secret access keys as a security best practice, but you can always generate new access keys at any time.

So if you don't remember your AWS_SECRET_ACCESS_KEY, the blog goes on to tell how to create a new one:

  1. Create a new access key:

enter image description here

  1. "Download the .csv key file, which contains the access key ID and secret access key.":

enter image description here

As for your other questions:

  • I'm not sure about MERCHANT_ID and MARKETPLACE_ID.
  • I believe your sandbox question was addressed by Amit's point that you can play with AWS for a year without paying.
查看更多
登录 后发表回答