Cloud concept · Updated

AWS SDKs - AWS SDKs are language-specific software development kits that let applications interact with AWS service APIs through familiar programming interfaces.

In short

An SDK turns application code into requests to cloud services, handling common tasks such as request signing, serialization, credential lookup, and response parsing. Engineers choose SDKs when service operations belong inside an application or custom automation, rather than in a graphical console, shell command, or infrastructure template.

Cloud Concepts Hub →

6 key aspects of AWS SDKs

SDKs simplify authenticated, language-native service access while leaving application correctness, permissions, configuration, and operational safeguards with the engineer.

01
Language-native API access

SDKs expose service operations through language-specific clients, methods, and data structures. This lets engineers integrate cloud operations directly into application workflows without manually implementing the underlying HTTP protocol.

02
Credential lookup and request signing

Supported credential providers locate credentials, and SDKs sign authenticated requests as required. Prefer temporary credentials from roles or federation, and grant only the permissions the application needs.

03
Configurable service clients

Clients use settings such as Region, endpoint, timeouts, and retry behavior. Configure these deliberately so an application targets the intended resources and handles network conditions appropriately.

04
Resilience and response handling

SDKs commonly support retries for selected failures, structured error handling, and pagination helpers. Applications must still handle exhausted retries, partial workflows, and duplicate-operation risks.

05
Application integration rather than infrastructure state management

SDKs are well suited to application logic and custom operational automation. Although they can provision resources, they do not inherently maintain a declarative infrastructure state or manage resource lifecycles like an IaC system.

06
Shared service permissions and costs

Using an SDK does not bypass IAM authorization, service quotas, or billing. Evaluate the permissions, request volume, and data-transfer implications of the underlying API operations.

Cloud services for AWS SDKs

A typical application can run in AWS Lambda, use its execution role for temporary credentials, and access Amazon S3 and Amazon DynamoDB through SDK clients. AWS STS supports temporary credential workflows, including role assumption when explicitly configured. IAM policies determine which operations those credentials authorize. AWS CloudFormation can provision the function, data resources, and roles from templates, while SDK calls perform application-time operations. This separation keeps infrastructure lifecycle management in IaC and business logic in application code, although custom automation can also use an SDK to invoke CloudFormation stack operations.

Amazon S3Amazon S3

Applications use SDK clients to upload, download, and manage objects. Higher-level transfer utilities available in some SDKs can simplify multipart uploads and concurrent transfers.

Amazon DynamoDBAmazon DynamoDB

SDKs let applications read and write items, run queries, and use conditional operations. Engineers must still design access patterns and handle throttling and pagination where relevant.

AWS LambdaAWS Lambda

Function code can use SDKs to call other AWS services with permissions supplied through its execution role. Packaging the SDK version required by the application helps make dependency behavior predictable.

AWS CloudFormationAWS CloudFormation

CloudFormation manages infrastructure from templates, providing a useful contrast to imperative SDK calls. SDK-based automation can submit and monitor CloudFormation stacks while leaving resource lifecycle orchestration to CloudFormation.

AWS SDKs exam questions

Real practice exam questions on AWS SDKs, with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

A company must keep its document-processing application on servers in its own data center. The development team plans to use AWS SDK for .NET libraries to access an existing Amazon S3 bucket. A reviewer claims that using these libraries requires moving the application to AWS. Which assessment is correct?

Show answerCORRECT ANSWER

The application can remain in the data center if it has network access to the service endpoint and valid AWS credentials with the required permissions.

AWS SDKs can run outside AWS, including on data center servers. They call AWS service APIs over the network using AWS credentials, and the associated permissions determine which operations are allowed.

MLA-C02 (beta)

A Python release application runs on an Amazon EC2 instance in a development AWS account. It must provision Amazon SageMaker AI hosting resources in a production account by using Boto3. The instance profile supplies development-account credentials. A production deployment role trusts the instance role and grants the necessary hosting API and iam:PassRole permissions. A separate production model execution role trusts only SageMaker AI and grants access to the model artifacts and inference image. The instance role is allowed to assume the production deployment role. No local credential profiles are configured, and all required resources are in the same AWS Region.

Which implementation allows the application to create the hosting resources in the production account without storing long-term access keys?

Show answerCORRECT ANSWER

Call STS assume_role for the production deployment role. Create a Boto3 session using the returned access key ID, secret access key, and session token. Use that session's SageMaker client to create the hosting resources, specifying the production model execution role in create_model.

The assumed-role credentials make the hosting API requests under the production deployment role. The separate model execution role lets SageMaker AI access the artifacts and image. Both credential sources are temporary, so no long-term access keys need to be stored.

DEA-C01

A company operates a multi-tenant data ingestion service. Its Python workers use Boto3 and one shared IAM role to access datasets in customers' AWS accounts. Each customer creates a read-only IAM role that trusts the service's shared role and registers the destination role ARN with the service.

A security review finds that a malicious customer could register another customer's role ARN and cause the service to access that customer's data. The company must prevent this confused deputy problem while retaining the shared worker role and avoiding long-term customer credentials.

Which solution should a data engineer implement?

Show answerCORRECT ANSWER

Generate a unique external ID for each customer and store its association with that customer in the service. Require the matching sts:ExternalId in each destination role's trust policy. Have the workers call AWS STS AssumeRole with the registered role ARN and the external ID selected from the authenticated customer's stored configuration.

A customer-specific external ID, controlled by the service and enforced by the destination role's trust policy, prevents the service from assuming another customer's role on behalf of an attacker. The worker uses the authenticated customer's stored external ID rather than accepting an arbitrary value from the request. AssumeRole returns temporary credentials for accessing the dataset.

Practice AWS SDKs in a full exam

Questions on AWS SDKs in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is AWS SDKs

2 min read

AWS SDKs provide libraries that applications use to call AWS service APIs in languages such as Python, Java, JavaScript, and .NET languages. Instead of constructing HTTP requests, calculating authentication signatures, and parsing raw responses manually, developers create a service client and invoke operations exposed by the library. For example, an application can upload a document to object storage, retrieve a database item, or send work to a queue through SDK calls.

The distinction between an API and an SDK matters. An API defines the operations a service accepts and the request and response formats. An SDK is a language-specific implementation that makes those operations easier to use. Direct API access remains possible without an SDK, but the developer must handle more protocol and authentication details. SDKs do not provide a separate authorization path: service permissions and resource policies still determine whether each request succeeds.

Choose an SDK when cloud interactions need to be integrated into application logic. A Python web application might use Boto3, the AWS SDK for Python, to store an uploaded file in Amazon S3 and write its metadata to Amazon DynamoDB. The same approach works from a developer workstation, an on-premises server, a container, or an AWS Lambda function, provided the application has appropriate credentials and network access to the service endpoint.

Credentials should come from supported credential providers rather than hard-coded access keys. For workloads running on AWS, an IAM role can supply temporary credentials that supported SDK providers refresh automatically. Developers can use supported profiles or federated sign-in workflows for local access. The client must also use appropriate regional and endpoint settings. Choosing a Region does not grant permissions or automatically move existing resources into that Region.

SDKs commonly provide retry handling for selected transient errors and throttling responses, but retries do not guarantee success. Engineers must configure suitable timeouts, understand service quotas, and handle exceptions. Paginated operations may require multiple requests to retrieve all results; an SDK paginator can help where available. Retried write operations also require care: use service-supported idempotency mechanisms where applicable so an uncertain response does not lead to duplicate work.

Other access methods suit different tasks. The AWS Management Console supports interactive exploration and manual administration. The AWS CLI suits terminal-based operations and shell automation. Infrastructure as code, such as AWS CloudFormation templates, is generally preferable for repeatable resource provisioning and lifecycle management. SDK code can create resources, but ordinary API calls do not automatically provide declarative state management, drift detection, or rollback orchestration.

SDKs reduce integration effort but introduce dependencies that require version management, testing, and updates. They do not eliminate service charges, network failures, or security responsibilities. For exam scenarios, application code that needs to call AWS services usually points to an SDK; interactive administration points to the console, command-line tasks to the CLI, and repeatable infrastructure definitions to IaC.

Learn AWS SDKs in lessons

4 short lessons on AWS SDKs in 3 certification courses.

Open the lessons