Setting up with Amazon ECR - Amazon ECR
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.

Setting up with Amazon ECR

If you've signed up for Amazon and have been using Amazon Elastic Container Service (Amazon ECS) or Amazon Elastic Kubernetes Service (Amazon EKS), you are close to being able to use Amazon ECR. The setup process for those two services is similar, as Amazon ECR is an extension of both services. When using the Amazon CLI with Amazon ECR, we recommend that you use a version of the Amazon CLI that supports the latest Amazon ECR features. If you do not see support for an Amazon ECR feature in the Amazon CLI, you should upgrade to the latest version. For more information, see http://www.amazonaws.cn/cli/.

Complete the following tasks to get set up to push a container image to Amazon ECR for the first time. If you have already completed any of these steps, you may skip them and move on to the next step.

Sign up for Amazon

When you sign up for Amazon, your Amazon account is automatically signed up for all services, including Amazon ECR. You are charged only for the services that you use.

If you have an Amazon account already, skip to the next task. If you don't have an Amazon account, use the following procedure to create one.

To create an Amazon account

  1. Open https://portal.amazonaws.cn/billing/signup.

  2. Follow the online instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

Note your Amazon account number, because you'll need it for the next task.

Create an IAM user

Services in Amazon, such as Amazon ECR, require that you provide credentials when you access them, so that the service can determine whether you have permission to access its resources. The console requires your password. You can create access keys for your Amazon account to access the command line interface or API. However, we don't recommend that you access Amazon using the credentials for your Amazon account; we recommend that you use Amazon Identity and Access Management (IAM) instead. Create an IAM user, and then add the user to an IAM group with administrative permissions or grant this user administrative permissions. You can then access Amazon using a special URL and the credentials for the IAM user.

If you signed up for Amazon but have not created an IAM user for yourself, you can create one using the IAM console.

To create an administrator user for yourself and add the user to an administrators group (console)

  1. Sign in to the IAM console as the account owner by choosing Root user and entering your Amazon Web Services account email address. On the next page, enter your password.

    Note

    We strongly recommend that you adhere to the best practice of using the Administrator IAM user that follows and securely lock away the root user credentials. Sign in as the root user only to perform a few account and service management tasks.

  2. In the navigation pane, choose Users and then choose Add users.

  3. For User name, enter Administrator.

  4. Select the check box next to Amazon Web Services Management Console access. Then select Custom password, and then enter your new password in the text box.

  5. (Optional) By default, Amazon requires the new user to create a new password when first signing in. You can clear the check box next to User must create a new password at next sign-in to allow the new user to reset their password after they sign in.

  6. Choose Next: Permissions.

  7. Under Set permissions, choose Add user to group.

  8. Choose Create group.

  9. In the Create group dialog box, for Group name enter Administrators.

  10. Choose Filter policies, and then select Amazon managed - job function to filter the table contents.

  11. In the policy list, select the check box for AdministratorAccess. Then choose Create group.

    Note

    You must activate IAM user and role access to Billing before you can use the AdministratorAccess permissions to access the Amazon Billing and Cost Management console. To do this, follow the instructions in step 1 of the tutorial about delegating access to the billing console.

  12. Back in the list of groups, select the check box for your new group. Choose Refresh if necessary to see the group in the list.

  13. Choose Next: Tags.

  14. (Optional) Add metadata to the user by attaching tags as key-value pairs. For more information about using tags in IAM, see Tagging IAM entities in the IAM User Guide.

  15. Choose Next: Review to see the list of group memberships to be added to the new user. When you are ready to proceed, choose Create user.

You can use this same process to create more groups and users and to give your users access to your Amazon Web Services account resources. To learn about using policies that restrict user permissions to specific Amazon resources, see Access management and Example policies.

To sign in as this new IAM user, sign out of the Amazon console, then use the following URL, where your_aws_account_id is your Amazon account number without the hyphens (for example, if your Amazon account number is 1234-5678-9012, your Amazon account ID is 123456789012):

https://your_aws_account_id.signin.aws.amazon.com/console/

Enter the IAM user name and password that you just created. When you're signed in, the navigation bar displays "your_user_name @ your_aws_account_id".

If you don't want the URL for your sign-in page to contain your Amazon account ID, you can create an account alias. From the IAM dashboard, choose Customize and enter an Account Alias, such as your company name. For more information, see Your Amazon account ID and its alias in the IAM User Guide.

To sign in after you create an account alias, use the following URL:

https://your_account_alias.signin.aws.amazon.com/console/

To verify the sign-in link for IAM users for your account, open the IAM console and check under IAM users sign-in link on the dashboard.

For more information about IAM, see the Amazon Identity and Access Management User Guide.