python removeVault.py us-east-1 LIST produces the following output:
16:38:21 - INFO : Running with 1 processes
16:38:21 - INFO : Found credentials in environment variables.
16:38:23 - INFO : Working on AccountID: 999999999999
16:38:23 - INFO : Connecting to Amazon Glacier...
16:38:23 - INFO : Getting list of vaults...
16:38:25 - INFO : some_vault_name
16:38:25 - INFO : some_vault_name_mapping
16:38:25 - INFO : the_vault_i_want
Exception "ResourceNotFoundException" occured with message "An error occurred (ResourceNotFoundException) when calling the DescribeVault operation: Vault not found for ARN: arn:aws:glacier:eu-west-1:058211890657:vaults/Photos"
What am I doing wrong? I get the same results when I substitute the_vault_i_want with some_vault_name. The full DEBUG output follows.
16:47:45 - INFO : Logging level set to DEBUG.
16:47:45 - INFO : Running with 1 processes
16:47:45 - DEBUG : Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
16:47:45 - DEBUG : Changing event name from before-call.apigateway to before-call.api-gateway
16:47:45 - DEBUG : Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
16:47:45 - DEBUG : Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
16:47:45 - DEBUG : Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
16:47:45 - DEBUG : Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
16:47:45 - DEBUG : Changing event name from docs..autoscaling.CreateLaunchConfiguration.complete-section to docs..auto-scaling.CreateLaunchConfiguration.complete-section
16:47:45 - DEBUG : Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
16:47:45 - DEBUG : Changing event name from docs..logs.CreateExportTask.complete-section to docs..cloudwatch-logs.CreateExportTask.complete-section
16:47:45 - DEBUG : Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
16:47:45 - DEBUG : Changing event name from docs..cloudsearchdomain.Search.complete-section to docs..cloudsearch-domain.Search.complete-section
16:47:45 - DEBUG : Looking for credentials via: env
16:47:45 - INFO : Found credentials in environment variables.
16:47:45 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data\endpoints.json
16:47:45 - DEBUG : Event choose-service-name: calling handler <function handle_service_name_alias at 0x03C7AF18>
16:47:46 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data\sts\2011-06-15\service-2.json
16:47:46 - DEBUG : Event creating-client-class.sts: calling handler <function add_generate_presigned_url at 0x03B14ED0>
16:47:46 - DEBUG : The s3 config key is not a dictionary type, ignoring its value of: None
16:47:46 - DEBUG : Setting sts timeout as (60, 60)
16:47:46 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data_retry.json
16:47:46 - DEBUG : Registering retry handlers for service: sts
16:47:46 - DEBUG : Event before-parameter-build.sts.GetCallerIdentity: calling handler <function generate_idempotent_uuid at 0x03C8BAE0>
16:47:46 - DEBUG : Event before-call.sts.GetCallerIdentity: calling handler <function inject_api_version_header_if_needed at 0x03C918E8>
16:47:46 - DEBUG : Making request for OperationModel(name=GetCallerIdentity) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'Boto3/1.9.130 Python/3.6.4 Windows/10 Botocore/1.12.130'}, 'body': {'Action': 'GetCallerIdentity', 'Version': '2011-06-15'}, 'url': 'https://sts.amazonaws.com/', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x03EE84D0>, 'has_streaming_input': False, 'auth_type': None}}
16:47:46 - DEBUG : Event request-created.sts.GetCallerIdentity: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x03EE8410>>
16:47:46 - DEBUG : Event choose-signer.sts.GetCallerIdentity: calling handler <function set_operation_specific_signer at 0x03C8BA50>
16:47:46 - DEBUG : Calculating signature using v4 auth.
16:47:46 - DEBUG : CanonicalRequest:
POST
/
python removeVault.py us-east-1 LIST
produces the following output:So I issue this command:
python removeVault.py eu-west-1 the_vault_i_want 4
And I get the following error:
What am I doing wrong? I get the same results when I substitute
the_vault_i_want
withsome_vault_name
. The full DEBUG output follows.16:47:45 - INFO : Logging level set to DEBUG. 16:47:45 - INFO : Running with 1 processes 16:47:45 - DEBUG : Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane 16:47:45 - DEBUG : Changing event name from before-call.apigateway to before-call.api-gateway 16:47:45 - DEBUG : Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict 16:47:45 - DEBUG : Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration 16:47:45 - DEBUG : Changing event name from before-parameter-build.route53 to before-parameter-build.route-53 16:47:45 - DEBUG : Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search 16:47:45 - DEBUG : Changing event name from docs..autoscaling.CreateLaunchConfiguration.complete-section to docs..auto-scaling.CreateLaunchConfiguration.complete-section 16:47:45 - DEBUG : Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask 16:47:45 - DEBUG : Changing event name from docs..logs.CreateExportTask.complete-section to docs..cloudwatch-logs.CreateExportTask.complete-section 16:47:45 - DEBUG : Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search 16:47:45 - DEBUG : Changing event name from docs..cloudsearchdomain.Search.complete-section to docs..cloudsearch-domain.Search.complete-section 16:47:45 - DEBUG : Looking for credentials via: env 16:47:45 - INFO : Found credentials in environment variables. 16:47:45 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data\endpoints.json 16:47:45 - DEBUG : Event choose-service-name: calling handler <function handle_service_name_alias at 0x03C7AF18> 16:47:46 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data\sts\2011-06-15\service-2.json 16:47:46 - DEBUG : Event creating-client-class.sts: calling handler <function add_generate_presigned_url at 0x03B14ED0> 16:47:46 - DEBUG : The s3 config key is not a dictionary type, ignoring its value of: None 16:47:46 - DEBUG : Setting sts timeout as (60, 60) 16:47:46 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data_retry.json 16:47:46 - DEBUG : Registering retry handlers for service: sts 16:47:46 - DEBUG : Event before-parameter-build.sts.GetCallerIdentity: calling handler <function generate_idempotent_uuid at 0x03C8BAE0> 16:47:46 - DEBUG : Event before-call.sts.GetCallerIdentity: calling handler <function inject_api_version_header_if_needed at 0x03C918E8> 16:47:46 - DEBUG : Making request for OperationModel(name=GetCallerIdentity) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'Boto3/1.9.130 Python/3.6.4 Windows/10 Botocore/1.12.130'}, 'body': {'Action': 'GetCallerIdentity', 'Version': '2011-06-15'}, 'url': 'https://sts.amazonaws.com/', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x03EE84D0>, 'has_streaming_input': False, 'auth_type': None}} 16:47:46 - DEBUG : Event request-created.sts.GetCallerIdentity: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x03EE8410>> 16:47:46 - DEBUG : Event choose-signer.sts.GetCallerIdentity: calling handler <function set_operation_specific_signer at 0x03C8BA50> 16:47:46 - DEBUG : Calculating signature using v4 auth. 16:47:46 - DEBUG : CanonicalRequest: POST /
content-type:application/x-www-form-urlencoded; charset=utf-8 host:sts.amazonaws.com x-amz-date:20190405T214746Z
content-type;host;x-amz-date ab821ae955788b0e33ebd34c208442ccfc2d406e2edc5e7a39bd6458fbb4f843 16:47:46 - DEBUG : StringToSign: AWS4-HMAC-SHA256 20190405T214746Z 20190405/us-east-1/sts/aws4_request 801a6ca33577d66d1064199d4edfb8f74e7428d2a252966c5a8011be5d35e697 16:47:46 - DEBUG : Signature: fb979e2c0f091946253011a1edc9e80aacc000335cac479c9e95064688a49331 16:47:46 - DEBUG : Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://sts.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'Boto3/1.9.130 Python/3.6.4 Windows/10 Botocore/1.12.130', 'X-Amz-Date': b'20190405T214746Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAI27BC4DWAXEILKPQ/20190405/us-east-1/sts/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=fb979e2c0f091946253011a1edc9e80aacc000335cac479c9e95064688a49331', 'Content-Length': '43'}> 16:47:46 - DEBUG : Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None) 16:47:46 - DEBUG : Starting new HTTPS connection (1): sts.amazonaws.com:443 16:47:47 - DEBUG : https://sts.amazonaws.com:443 "POST / HTTP/1.1" 200 387 16:47:47 - DEBUG : Response headers: {'x-amzn-RequestId': '73c8d2e0-57ec-11e9-9deb-b93098d96c28', 'Content-Type': 'text/xml', 'Content-Length': '387', 'Date': 'Fri, 05 Apr 2019 21:47:47 GMT'} 16:47:47 - DEBUG : Response body: b'\n \n arn:aws:iam::058211890657:root \n 058211890657 \n 058211890657 \n \n \n 73c8d2e0-57ec-11e9-9deb-b93098d96c28 \n \n \n'
16:47:47 - DEBUG : Event needs-retry.sts.GetCallerIdentity: calling handler <botocore.retryhandler.RetryHandler object at 0x03EE86D0>
16:47:47 - DEBUG : No retry needed.
16:47:47 - INFO : Working on AccountID: 058211890657
16:47:47 - INFO : Connecting to Amazon Glacier...
16:47:47 - DEBUG : Event choose-service-name: calling handler <function handle_service_name_alias at 0x03C7AF18>
16:47:47 - DEBUG : Loading JSON file: C:\Users\hargrove\AppData\Local\Programs\Python\Python36-32\lib\site-packages\botocore-1.12.130-py3.6.egg\botocore\data\glacier\2012-06-01\service-2.json
16:47:47 - DEBUG : Event creating-client-class.glacier: calling handler <function add_generate_presigned_url at 0x03B14ED0>
16:47:47 - DEBUG : The s3 config key is not a dictionary type, ignoring its value of: None
16:47:47 - DEBUG : Setting glacier timeout as (60, 60)
16:47:47 - DEBUG : Registering retry handlers for service: glacier
16:47:47 - INFO : Getting selected vault... [the_vault_i_want]
16:47:47 - DEBUG : Event before-parameter-build.glacier.DescribeVault: calling handler <function inject_account_id at 0x03C914B0>
16:47:47 - DEBUG : Event before-parameter-build.glacier.DescribeVault: calling handler <function generate_idempotent_uuid at 0x03C8BAE0>
16:47:47 - DEBUG : Event before-call.glacier.DescribeVault: calling handler <function add_glacier_version at 0x03C914F8>
16:47:47 - DEBUG : Event before-call.glacier.DescribeVault: calling handler <function inject_api_version_header_if_needed at 0x03C918E8>
16:47:47 - DEBUG : Making request for OperationModel(name=DescribeVault) with params: {'url_path': '/-/vaults/the_vault_i_want', 'query_string': {}, 'method': 'GET', 'headers': {'User-Agent': 'Boto3/1.9.130 Python/3.6.4 Windows/10 Botocore/1.12.130', 'x-amz-glacier-version': '2012-06-01'}, 'body': b'', 'url': 'https://glacier.eu-west-1.amazonaws.com/-/vaults/the_vault_i_want', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x045C4170>, 'has_streaming_input': False, 'auth_type': None}}
16:47:47 - DEBUG : Event request-created.glacier.DescribeVault: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x045C4110>>
16:47:47 - DEBUG : Event choose-signer.glacier.DescribeVault: calling handler <function set_operation_specific_signer at 0x03C8BA50>
16:47:47 - DEBUG : Calculating signature using v4 auth.
16:47:47 - DEBUG : CanonicalRequest:
GET
/-/vaults/the_vault_i_want
host:glacier.eu-west-1.amazonaws.com x-amz-date:20190405T214747Z x-amz-glacier-version:2012-06-01
host;x-amz-date;x-amz-glacier-version e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 16:47:47 - DEBUG : StringToSign: AWS4-HMAC-SHA256 20190405T214747Z 20190405/eu-west-1/glacier/aws4_request b5d496b49748bf116a47814d922eed3129d76080c8a6ac70192669a3292e5faa 16:47:47 - DEBUG : Signature: 0c53981ba328115e9d892e8af82b3c6d3b049267bcb06ebcd3ad0f4d99c6e3f1 16:47:47 - DEBUG : Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://glacier.eu-west-1.amazonaws.com/-/vaults/the_vault_i_want, headers={'User-Agent': b'Boto3/1.9.130 Python/3.6.4 Windows/10 Botocore/1.12.130', 'x-amz-glacier-version': b'2012-06-01', 'X-Amz-Date': b'20190405T214747Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAI27BC4DWAXEILKPQ/20190405/eu-west-1/glacier/aws4_request, SignedHeaders=host;x-amz-date;x-amz-glacier-version, Signature=0c53981ba328115e9d892e8af82b3c6d3b049267bcb06ebcd3ad0f4d99c6e3f1'}> 16:47:47 - DEBUG : Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None) 16:47:47 - DEBUG : Starting new HTTPS connection (1): glacier.eu-west-1.amazonaws.com:443 16:47:49 - DEBUG : https://glacier.eu-west-1.amazonaws.com:443 "GET /-/vaults/the_vault_i_want HTTP/1.1" 404 142 16:47:49 - DEBUG : Response headers: {'x-amzn-RequestId': 'Qc5bvSHT9xbxNQ5GHJXFD0SXLt_nMRvjeF-evo5VwshsMgk', 'Content-Type': 'application/json', 'Content-Length': '142', 'Date': 'Fri, 05 Apr 2019 21:47:48 GMT'} 16:47:49 - DEBUG : Response body: b'{"code":"ResourceNotFoundException","message":"Vault not found for ARN: arn:aws:glacier:eu-west-1:058211890657:vaults/the_vault_i_want","type":"Client"}' 16:47:49 - DEBUG : Event needs-retry.glacier.DescribeVault: calling handler <botocore.retryhandler.RetryHandler object at 0x045C4590> 16:47:49 - DEBUG : No retry needed. 16:47:49 - ERROR : Exception "ResourceNotFoundException" occured with message "An error occurred (ResourceNotFoundException) when calling the DescribeVault operation: Vault not found for ARN: arn:aws:glacier:eu-west-1:058211890657:vaults/the_vault_i_want"