SDK
Software Development Kit
A collection of software development tools. Includes libraries, documentation, and sample code. Provided per platform.
Software Development Kit
A collection of software development tools. Includes libraries, documentation, and sample code. Provided per platform.
An SDK (Software Development Kit) is a comprehensive package of tools, libraries, documentation, and code samples needed to develop applications for a specific platform or service. With an SDK, developers do not need to implement everything from scratch and can develop quickly and reliably by using functionality that the platform provider has prepared in advance. Representative examples include the Android SDK, iOS SDK, and AWS SDK.
An SDK, an API, and a library are related but distinct concepts. An API is a communication specification (interface) between pieces of software, and a library is a collection of reusable code. An SDK includes both and additionally provides development tools, a debugger, an emulator, and documentation, making it a comprehensive development environment. For example, the Android SDK includes the Android API, various libraries, the Android Studio IDE, an emulator, and the ADB debugging tool.
An SDK has four core components. First, libraries and frameworks that make it easy to call platform functionality. Second, official documentation that includes API references and tutorials. Third, sample code and example projects that show actual usage. Fourth, tools that support development, such as compilers, debuggers, and testing tools.
In practice, SDKs maximize development productivity. The Android SDK makes it possible to develop apps for more than 3 billion devices worldwide, and the AWS SDK makes it possible to control more than 200 cloud services programmatically. Through third-party SDKs such as the OpenAI SDK, Stripe SDK, and Firebase SDK, payment, authentication, and AI features can be integrated with just a few lines of code, so in modern software development, SDKs are an essential tool.
"""
AWS SDK (boto3) 사용 예제
S3 버킷 생성, 파일 업로드, 다운로드를 포함한 실무 패턴
"""
import boto3
from botocore.exceptions import ClientError
import logging
import os
# 로깅 설정
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class S3Manager:
"""AWS S3 작업을 관리하는 클래스"""
def __init__(self, region_name: str = "ap-northeast-2"):
"""
S3 클라이언트 초기화
Args:
region_name: AWS 리전 (기본값: 서울)
"""
self.s3_client = boto3.client(
"s3",
region_name=region_name,
# 자격 증명은 환경 변수 또는 AWS CLI 설정에서 자동 로드
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
)
self.region = region_name
def create_bucket(self, bucket_name: str) -> bool:
"""
S3 버킷 생성
Args:
bucket_name: 생성할 버킷 이름 (전역적으로 고유해야 함)
Returns:
성공 여부
"""
try:
# 서울 리전은 LocationConstraint 필수
self.s3_client.create_bucket(
Bucket=bucket_name,
CreateBucketConfiguration={
"LocationConstraint": self.region
}
)
logger.info(f"버킷 생성 완료: {bucket_name}")
return True
except ClientError as e:
error_code = e.response["Error"]["Code"]
if error_code == "BucketAlreadyOwnedByYou":
logger.info(f"버킷이 이미 존재합니다: {bucket_name}")
return True
logger.error(f"버킷 생성 실패: {e}")
return False
def upload_file(
self,
file_path: str,
bucket_name: str,
object_key: str = None
) -> dict:
"""
파일을 S3에 업로드
Args:
file_path: 로컬 파일 경로
bucket_name: 대상 버킷 이름
object_key: S3 객체 키 (기본값: 파일명)
Returns:
업로드 결과 딕셔너리
"""
if object_key is None:
object_key = os.path.basename(file_path)
try:
# 파일 크기 확인
file_size = os.path.getsize(file_path)
# 5GB 이상이면 멀티파트 업로드 사용
if file_size > 5 * 1024 * 1024 * 1024:
logger.info("대용량 파일, 멀티파트 업로드 사용")
self.s3_client.upload_file(
file_path,
bucket_name,
object_key,
ExtraArgs={"ContentType": "application/octet-stream"}
)
# 업로드된 객체 URL 생성
url = f"https://{bucket_name}.s3.{self.region}.amazonaws.com/{object_key}"
logger.info(f"업로드 완료: {object_key}")
return {
"success": True,
"bucket": bucket_name,
"key": object_key,
"size_bytes": file_size,
"url": url
}
except ClientError as e:
logger.error(f"업로드 실패: {e}")
return {"success": False, "error": str(e)}
def download_file(
self,
bucket_name: str,
object_key: str,
download_path: str
) -> dict:
"""
S3에서 파일 다운로드
Args:
bucket_name: 소스 버킷 이름
object_key: S3 객체 키
download_path: 다운로드 경로
Returns:
다운로드 결과 딕셔너리
"""
try:
self.s3_client.download_file(
bucket_name,
object_key,
download_path
)
logger.info(f"다운로드 완료: {download_path}")
return {
"success": True,
"path": download_path,
"size_bytes": os.path.getsize(download_path)
}
except ClientError as e:
logger.error(f"다운로드 실패: {e}")
return {"success": False, "error": str(e)}
# 사용 예시
if __name__ == "__main__":
# S3 매니저 초기화
s3 = S3Manager(region_name="ap-northeast-2")
# 버킷 생성
bucket = "my-app-data-bucket-2024"
s3.create_bucket(bucket)
# 파일 업로드
result = s3.upload_file(
file_path="./data/model.pkl",
bucket_name=bucket,
object_key="models/v1/model.pkl"
)
if result["success"]:
print(f"업로드 URL: {result['url']}")
print(f"파일 크기: {result['size_bytes']:,} bytes")
"I think we should use the Stripe SDK to implement the payment feature. Implementing PCI-DSS compliance, 3D Secure, and various payment methods ourselves would take 6 months, but with the SDK, 2 weeks is enough. However, there is a fee per transaction, so we should also do a cost analysis."
"This SDK was last updated 2 years ago, and more than 300 GitHub issues have piled up. There are also reports of Android 14 compatibility problems. The official documentation is sparse too, so I think it would be better for us to build a wrapper that calls the official API directly. An SDK that isn't maintained becomes technical debt."
"If we go cross-platform, the Flutter SDK is a good choice. Google maintains it, the documentation is good, and development is fast thanks to Hot Reload. However, if we need a lot of native functionality, there are cases where we have to use each platform's SDK directly, so let's sort out the requirements first."
"When choosing an SDK, I look at three things. First, maintenance status - when the last GitHub commit was, and whether issue responses are active. Second, documentation quality - whether the example code and API reference are well organized. Third, community size - I check the number of Stack Overflow questions and npm weekly downloads. I had an experience where a SDK whose maintenance had stopped in a previous project led to a 2-month migration, so I've come to look at this part carefully."
"You specified the SDK version with a caret (^) in this PR, but for major SDKs it's better to pin an exact version. ^2.0.0 installs the latest 2.x.x version, but there are cases where even patch versions have breaking changes. Especially for payment SDKs, let's pin the version and commit the lockfile so the whole team uses the same version. And let's install with npm ci in CI as well."
Take a mock interview on this topic → WIA SOOM AI Interview · Start for free
Be sure to check compatibility between the SDK version and the runtime environment. For example, Android SDK 34 requires Java 17 or later, and AWS SDK v3 requires Node.js 14 or later. When upgrading a major version, you must carefully check the release notes for breaking changes.
Check whether the SDK's license is compatible with your project. Using a GPL-licensed SDK in a commercial app may create an obligation to disclose the source code. Most commercial SDKs use MIT, Apache 2.0, or their own commercial license, and in some cases legal team review is needed.
When a security vulnerability is found in an SDK, you must update immediately. Automatically monitor dependency vulnerabilities with tools such as Dependabot and Snyk, and especially for SDKs related to authentication, payments, and encryption, subscribe to security announcements and respond promptly.