AWS S3 CLI-엔드 포인트 URL에 연결할 수 없습니다.
$ aws s3 ls
Could not connect to the endpoint URL: "https://s3.us-east-1a.amazonaws.com/"
무엇이 문제일까요?
기본 지역의 기본 프로필에 문제가있을 수 있습니다.
파일을 체크 ~/.aws/config
, 당신은 같은 것을 가지고
[default]
region=us-east-1a
...
지역을로 수정하면 region=us-east-1
명령이 올바르게 작동합니다.
먼저 'aws configure'를 사용한 다음 액세스 키, 비밀 키 및 지역을 입력합니다. 입력 한 지역이이 문제에 중요합니다. 's3.us-east-1a'가 아닌 's3.us-east-1'과 같은 것을 입력 해보십시오. 문제를 해결할 것입니다.
일부 AWS 서비스는 실제 지역과 일치하지 않는 특정 지역에서만 사용할 수 있습니다. 이 경우 실제 cli 명령에 지역을 추가하여 표준 설정을 재정의 할 수 있습니다.
이것은 구성 파일에서 기본 영역을 변경하고 싶지 않은 사람들에게 편리한 솔루션 일 수 있습니다. 일반 구성 파일이 설정되지 않은 경우 : 위의 제안을 확인하십시오.
이 예에서 지역은 eu-west-1로 강제 설정됩니다 (예 : 아일랜드).
aws s3 ls --region=eu-west-1
사용자를 삭제하기 위해 aws workmail과 함께 테스트 및 사용 :
aws workmail delete-user --region=eu-west-1 --organization-id [org-id] --user-id [user-id]
저는이 스레드에서 아이디어를 도출했고 제게 완벽하게 작동하므로 공유하고 싶었습니다. 도움이 되었기를 바랍니다.
위에 제공된 해결 방법이 작동하지 않으면 권한 및 방화벽 설정도 확인하십시오. 제 경우에는 프록시 환경 변수를 추가하여 작업을 수행했습니다.
Linux 또는 Mac의 경우
$ export HTTP_PROXY=http://<YOUR PROXY IP>:<PORT>
$ export HTTPS_PROXY=http://<YOUR PROXY IP>:<PORT>
Windows의 경우
set HTTP_PROXY=http://<YOUR PROXY IP>:<PORT>
set HTTPS_PROXY=http://<YOUR PROXY IP>:<PORT>
aws configure를 사용하여 지정된 기본 리전을 사용하는 대신 CLI 스크립트에서 리전을 지정해야합니다 (현재 가장 인기있는 답변이 주장하는대로). 이에 대한 또 다른 대답이 암시되었지만 AWS Tools for Powershell을 통해 CLI를 사용하는 경우 구문이 잘못되었습니다.
This example forces region to us-west-2 (Northern California), PowerShell syntax:
aws s3 ls --region us-west-2
Probably, there is something wrong with the default region while configuring aws. In your case, the URL says "https://s3.us-east-1a.amazonaws.com/"
In your command prompt,
aws configure, enter your keys, Now fix your region from us-east-1a to us-east-1.
Kindly check the syntax according to the CLI you are using. This will be helpful.
Assuming that your profile in ~/aws/config
is using the region (instead of AZ as per your original question); the other cause is your client's inability to connect to s3.us-east-1.amazonaws.com
. In my case, I was unable to resolve that DNS name due to an error in my network configuration. Fixing the DNS issue solved my problem.
Couple things I've done to fix this :
- Updated my CLI and it given this error (previous error was "
aws connection aborted error 10013
") Tried to nslookup aws s3 endpoing : nslookup s3.us-east-2.amazonaws.com
DNS request timed out. timeout was 2 seconds. Server: UnKnown Address: 192.168.10.1
-> hmmm very weird
Went to windows network troubleshooting and selected to test access to specific page. It informed that Windows firewall blocked the connection. Fixed this
Received a new error , after fixing the request through firewal :
An error occurred (RequestTimeTooSkewed) when calling the ListBuckets operation: The difference between the request time and the current time is too large.
Updated my date & time to automatic -> Fixed
회사의 VPN을 사용하고있을 수 있습니다. Pls 연결을 끊고 다시 시도하십시오. 명령 프롬프트에서 동일한 오류가 발생하더라도 VPN 연결을 끊으면 출력이 나타납니다.
참고 URL : https://stackoverflow.com/questions/40409683/aws-s3-cli-could-not-connect-to-the-endpoint-url
'IT story' 카테고리의 다른 글
스크롤 위치 설정 (0) | 2020.09.06 |
---|---|
LocationManager에 대한 Android 확인 권한 (0) | 2020.09.06 |
Django의 SuspiciousOperation 잘못된 HTTP_HOST 헤더 (0) | 2020.09.06 |
Angular 2 '구성 요소'는 알려진 요소가 아닙니다. (0) | 2020.09.06 |
$ LOAD_PATH (Ruby)에 디렉토리 추가 (0) | 2020.09.06 |