ladderlore
  • 输入服务名称,例如 S3 或 IAM。

概念

Ways to access AWS

The console, the CLI, SDKs and infrastructure as code: the main ways to work with AWS. All of them call the same APIs.

本课尚未翻译,暂以英文显示。

Programmatic accessCLI
Direct API calls
AWS SDKsConsole
AWS APIs
Infrastructure as code (IaC)IAM
Your AWS resources
CloudTrailallowed?logged
Every way in reaches the same AWS APIs. IAM checks each request, and CloudTrail records it.
  • Console

    How you use it
    Point and click in a web browser
    Best for
    Learning, exploring and one-time tasks
    Repeatable?
    No. Someone clicks through the steps again each time.
  • CLI

    How you use it
    Type commands in a terminal, or save them in a script
    Best for
    Quick tasks and automating routine work
    Repeatable?
    Yes, once the commands are saved in a script
  • AWS SDKs

    How you use it
    Call AWS from your own application code
    Best for
    Applications that use AWS, such as an app that saves photos in Amazon S3
    Repeatable?
    Yes. The code works the same way each time.
  • Infrastructure as code (IaC)

    How you use it
    Describe the whole environment in a template file
    Best for
    Building the same environment again and again
    Repeatable?
    Yes. That is what it is for.
How the main ways compare.

1 / 2

  • Console

    How you use it
    Point and click in a web browser
    Best for
    Learning, exploring and one-time tasks
    Repeatable?
    No. Someone clicks through the steps again each time.
  • CLI

    How you use it
    Type commands in a terminal, or save them in a script
    Best for
    Quick tasks and automating routine work
    Repeatable?
    Yes, once the commands are saved in a script

2 / 2

  • AWS SDKs

    How you use it
    Call AWS from your own application code
    Best for
    Applications that use AWS, such as an app that saves photos in Amazon S3
    Repeatable?
    Yes. The code works the same way each time.
  • Infrastructure as code (IaC)

    How you use it
    Describe the whole environment in a template file
    Best for
    Building the same environment again and again
    Repeatable?
    Yes. That is what it is for.
How the main ways compare.

是什么

Everything you do in AWS is a request to an API, an application programming interface. You can send those requests in several ways. In the AWS Management Console, you point and click in a web browser. The AWS Command Line Interface (AWS CLI) runs commands that you type or save in scripts. AWS SDKs let application code call AWS. Infrastructure as code (IaC) builds a whole environment from a template, for example with AWS CloudFormation.

是什么

Whichever way you choose, the request reaches the same APIs. AWS Identity and Access Management (IAM) checks that the caller is allowed to do it, and AWS CloudTrail records it. The CLI, the SDKs and direct API calls are called programmatic access. They sign requests with access keys instead of a password.

To choose, ask two questions. Is this a one-time task, or will it be repeated? Is a person doing it, or an application? The console suits learning and one-time tasks. The CLI and SDKs suit automation and applications. IaC suits environments that must be built the same way every time.

要记住

  • Console: clicks in a browser. Best for learning and one-time tasks.
  • CLI: typed commands and scripts. Best for quick tasks and automating routine work.
  • SDKs: AWS calls from inside application code.
  • IaC: a template builds the whole environment, the same way every time.

要记住

  • Programmatic access (CLI, SDKs, APIs) uses access keys. The console uses a password.
  • All of them call the same APIs, so IAM permissions and CloudTrail logging work the same way.

考试中

  • “Repeatable”, “consistent” or “the same environment many times” points to infrastructure as code. “One-time” or “explore a service” points to the console.
  • “Programmatic access” or “automate with scripts” points to the AWS CLI or the AWS SDKs.