Reputation: 2894
I've been following the instructions on the AWS Docs https://docs.aws.amazon.com/amazonglacier/latest/dev/getting-started-delete-archive-cli.html and it works up until the last command where I delete the archive by its ID.
The command executes fine but the archive still in the vault, is there a time delay between aws glacier delete-archive
and the archive actually getting deleted?
aws --debug glacier delete-archive --vault-name test-vault --account-id 1234567890 --archive-id "XIEYSpXAEcTO27fXXREDyb4BssF-nZPi8sIIyvqqfDFXkO4zBdeFfPRBgqmXaRJPGwmpdllkwWpBRtNocrVZv4Q6yJLwCDym6wELMsVw_ZDQq9_WnUE6ufgPT0Le-364s-HGyh47Qw"
2021-02-20 16:37:15,290 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=DeleteArchive) with params: {'url_path': '/1234567890/vaults/test-vault/archives/XIEYSpXAEcTO27fXXREDyb4BssF-nZPi8sIIyvqqfDFXkO4zBdeFfPRBgqmXaRJPGwmpdllkwWpBRtNocrVZv4Q6yJLwCDym6wELMsVw_ZDQq9_WnUE6ufgPT0Le-364s-HGyh47Qw', 'query_string': {}, 'method': 'DELETE', 'headers': {'User-Agent': 'aws-cli/2.0.38 Python/3.7.4 Darwin/20.3.0 exe/x86_64 command/glacier.delete-archive', 'x-amz-glacier-version': '2012-06-01'}, 'body': b'', 'url': ' 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x7fd5e7a9d8d0>, 'has_streaming_input': False, 'auth_type': None}}
2021-02-20 16:37:15,290 - MainThread - botocore.hooks - DEBUG - Event request-created.glacier.DeleteArchive: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7fd5e7a9d790>>
2021-02-20 16:37:15,291 - MainThread - botocore.hooks - DEBUG - Event choose-signer.glacier.DeleteArchive: calling handler <function set_operation_specific_signer at 0x7fd5e67118c0>
2021-02-20 16:37:15,291 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-02-20 16:37:15,291 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
DELETE
/1234567890/vaults/test-vault/archives/XIEYSpXAEcTO27fXXREDyb4BssF-nZPi8sIIyvqqfDFXkO4zBdeFfPRBgqmXaRJPGwmpdllkwWpBRtNocrVZv4Q6yJLwCDym6wELMsVw_ZDQq9_WnUE6ufgPT0Le-364s-HGyh47Qw
host:glacier.eu-west-1.amazonaws.com
x-amz-date:20210220T163715Z
x-amz-glacier-version:2012-06-01
host;x-amz-date;x-amz-glacier-version
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2021-02-20 16:37:15,291 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210220T163715Z
20210220/eu-west-1/glacier/aws4_request
3ac54f35e66fba13673a078b721c5db02a9f00c538bd96fc5b2d5b5709926b75
2021-02-20 16:37:15,292 - MainThread - botocore.auth - DEBUG - Signature:
1a09aef04ae7830ae5a7623cedb6ca69bf8cdef7349e3f3493a116967ba03110
2021-02-20 16:37:15,292 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=DELETE, url=https://glacier.eu-west-1.amazonaws.com/1234567890/vaults/test-vault/archives/XIEYSpXAEcTO27fXXREDyb4BssF-nZPi8sIIyvqqfDFXkO4zBdeFfPRBgqmXaRJPGwmpdllkwWpBRtNocrVZv4Q6yJLwCDym6wELMsVw_ZDQq9_WnUE6ufgPT0Le-364s-HGyh47Qw, headers={'User-Agent': b'aws-cli/2.0.38 Python/3.7.4 Darwin/20.3.0 exe/x86_64 command/glacier.delete-archive', 'x-amz-glacier-version': b'2012-06-01', 'X-Amz-Date': b'20210220T163715Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=<Access Key Removed>/20210220/eu-west-1/glacier/aws4_request, SignedHeaders=host;x-amz-date;x-amz-glacier-version, Signature=1a09aef04ae7830ae5a7623cedb6ca69bf8cdef7349e3f3493a116967ba03110', 'Content-Length': '0'}>
2021-02-20 16:37:15,294 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): glacier.eu-west-1.amazonaws.com:443
2021-02-20 16:37:15,510 - MainThread - urllib3.connectionpool - DEBUG - https://glacier.eu-west-1.amazonaws.com:443 "DELETE /1234567890/vaults/test-vault/archives/XIEYSpXAEcTO27fXXREDyb4BssF-nZPi8sIIyvqqfDFXkO4zBdeFfPRBgqmXaRJPGwmpdllkwWpBRtNocrVZv4Q6yJLwCDym6wELMsVw_ZDQq9_WnUE6ufgPT0Le-364s-HGyh47Qw HTTP/1.1" 204 0
2021-02-20 16:37:15,511 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amzn-RequestId': 'mR_DR8mtULOgCU0FDDv_aec7eYp34-QtXBONWBtWXjH1yts', 'Date': 'Sat, 20 Feb 2021 16:37:15 GMT'}
2021-02-20 16:37:15,511 - MainThread - botocore.parsers - DEBUG - Response body:
b''
2021-02-20 16:37:15,511 - MainThread - botocore.hooks - DEBUG - Event needs-retry.glacier.DeleteArchive: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7fd5e7aef190>>
2021-02-20 16:37:15,512 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2021-02-20 16:37:15,512 - MainThread - botocore.hooks - DEBUG - Event after-call.glacier.DeleteArchive: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7fd5e7a9dc50>>
2021-02-20 16:37:15,521 - MainThread - awscli.formatter - DEBUG - RequestId: mR_DR8mtULOgCU0FDDv_aec7eYp34-QtXBONWBtWXjH1yts
It's been over an hour since I executed the delete command and the vault still have the archive on it.
Has anyone had this issue? or does anyone know how I can delete a vault fully?
The console allows me to delete but fails with the vault not being empty.
ps: I've posted this on AWS Forum as well but that's always slow at getting answers, so I'm trying my luck here. https://forums.aws.amazon.com/thread.jspa?threadID=335827
Upvotes: 1
Views: 1117
Reputation: 78703
Per Deleting an Archive in Amazon S3 Glacier:
After you delete an archive, if you immediately download the vault inventory, it might include the deleted archive in the list because S3 Glacier prepares vault inventory only about once a day.
Upvotes: 4