boto3 client NoRegionError
Data Analyst

빅데이터 관련 자료

boto3 client NoRegionError

carpe08 2023. 12. 2. 12:46
320x100
320x100

boto3 연결 중 발생하는 error

botocore.exceptions.NoRegionError: You must specify a region.

athena = boto3.client('athena')

 

해결

athena = boto3.client('athena', region_name='ap-northeast-2')

AWS의 지역(Region)은 AWS 서비스가 호스팅되는 지리적 위치를 가리킵니다. 여러 지역이 있으며, 각각 다른 지역 코드를 가지고 있습니다. 아래는 몇 가지 AWS 지역과 해당 지역 코드 목록입니다:

      • 미국 동부 (미국 버지니아 북부): us-east-1
      • 미국 서부 (오레곤): us-west-2
      • 아시아 태평양 (도쿄): ap-northeast-1
      • 아시아 태평양 (싱가포르): ap-southeast-1
      • 유럽 (아일랜드): eu-west-1

이는 AWS 리전의 몇 가지 예시일 뿐이에요

320x100
320x100