Команды CLI aws s3 рано выходят из командного файла - PullRequest
0 голосов
/ 23 декабря 2018

Это мой командный файл:

aws s3 sync ./dummy_dist s3://www.mywebsite.com --delete --profile www.mywebsite.com_deploy --debug

echo ________________ here 1 __________________

Строка эха никогда не запускается!

Это отладочный вывод команды aws:

2018-12-23 10:51:52,518 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.16.81 Python/3.7.2rc1 Windows/10 botocore/1.12.71
2018-12-23 10:51:52,518 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'sync', './dummy_dist', 's3://www.mywebsite.com', '--delete', '--profile', 'www.mywebsite.com_deploy', '--debug']
2018-12-23 10:51:52,521 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x0000025A115B4488>
2018-12-23 10:51:52,521 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x0000025A1107F8C8>
2018-12-23 10:51:52,526 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x0000025A110DF9D8>
2018-12-23 10:51:52,529 - MainThread - botocore.credentials - DEBUG - Skipping environment variable credential check because profile name was explicitly set.
2018-12-23 10:51:52,530 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x0000025A11325840>
2018-12-23 10:51:52,531 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3: calling handler <function add_waiters at 0x0000025A115B7950>
2018-12-23 10:51:52,536 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.s3.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,537 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler <function register_sync_strategies at 0x0000025A115B09D8>
2018-12-23 10:51:52,539 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler <function add_waiters at 0x0000025A115B7950>
2018-12-23 10:51:52,541 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method BaseSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.sizeonly.SizeOnlySync object at 0x0000025A11630860>>
2018-12-23 10:51:52,541 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method BaseSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.exacttimestamps.ExactTimestampsSync object at 0x0000025A11687240>>
2018-12-23 10:51:52,546 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method BaseSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.delete.DeleteSync object at 0x0000025A11687160>>
2018-12-23 10:51:52,549 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.paths: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,551 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.dryrun: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,554 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,555 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.quiet: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,556 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,557 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,557 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.acl: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,558 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.follow-symlinks: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,559 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,562 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,566 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,566 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,567 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-key: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,568 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-kms-key-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,568 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-copy-source: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,569 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-copy-source-key: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,570 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.storage-class: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,571 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.grants: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,577 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.website-redirect: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,578 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-type: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,579 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.cache-control: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,580 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-disposition: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,581 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-encoding: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,581 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-language: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,582 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.expires: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,587 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.source-region: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,588 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.only-show-errors: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,588 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,589 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,590 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.page-size: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,591 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.ignore-glacier-warnings: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,591 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,592 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.force-glacier-transfer: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,598 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,598 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.request-payer: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,599 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.metadata: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,600 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.metadata-directive: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,601 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.size-only: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,602 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,602 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.exact-timestamps: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,604 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,608 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.delete: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000025A11687F98>
2018-12-23 10:51:52,608 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000025A110A4470>
2018-12-23 10:51:52,610 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role
2018-12-23 10:51:52,610 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file
2018-12-23 10:51:52,612 - MainThread - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials
2018-12-23 10:51:52,613 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Users\adamdry\AppData\Local\Programs\Python\Python37\lib\site-packages\botocore\data\endpoints.json
2018-12-23 10:51:52,618 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x0000025A10DB9B70>
2018-12-23 10:51:52,620 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Users\adamdry\AppData\Local\Programs\Python\Python37\lib\site-packages\botocore\data\s3\2006-03-01\service-2.json
2018-12-23 10:51:52,628 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_post at 0x0000025A10D79BF8>
2018-12-23 10:51:52,628 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_url at 0x0000025A10D799D8>
2018-12-23 10:51:52,630 - MainThread - botocore.args - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2018-12-23 10:51:52,634 - MainThread - botocore.endpoint - DEBUG - Setting s3 timeout as (60, 60)
2018-12-23 10:51:52,637 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: s3
2018-12-23 10:51:52,639 - MainThread - botocore.client - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2018-12-23 10:51:52,640 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x0000025A10DB9B70>
2018-12-23 10:51:52,641 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_post at 0x0000025A10D79BF8>
2018-12-23 10:51:52,642 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_url at 0x0000025A10D799D8>
2018-12-23 10:51:52,643 - MainThread - botocore.args - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2018-12-23 10:51:52,663 - MainThread - botocore.endpoint - DEBUG - Setting s3 timeout as (60, 60)
2018-12-23 10:51:52,664 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: s3
2018-12-23 10:51:52,666 - MainThread - botocore.client - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2018-12-23 10:51:52,667 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x0000025A10DB9B70>
2018-12-23 10:51:52,670 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_post at 0x0000025A10D79BF8>
2018-12-23 10:51:52,671 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_url at 0x0000025A10D799D8>
2018-12-23 10:51:52,671 - MainThread - botocore.args - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2018-12-23 10:51:52,674 - MainThread - botocore.endpoint - DEBUG - Setting s3 timeout as (60, 60)
2018-12-23 10:51:52,680 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: s3
2018-12-23 10:51:52,681 - MainThread - botocore.client - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2018-12-23 10:51:52,683 - MainThread - awscli.customizations.s3.s3handler - DEBUG - Using a multipart threshold of 8388608 and a part size of 8388608
2018-12-23 10:51:52,684 - MainThread - botocore.hooks - DEBUG - Event choosing-s3-sync-strategy: calling handler <bound method BaseSync.use_sync_strategy of <awscli.customizations.s3.syncstrategy.sizeonly.SizeOnlySync object at 0x0000025A11630860>>
2018-12-23 10:51:52,685 - MainThread - botocore.hooks - DEBUG - Event choosing-s3-sync-strategy: calling handler <bound method BaseSync.use_sync_strategy of <awscli.customizations.s3.syncstrategy.exacttimestamps.ExactTimestampsSync object at 0x0000025A11687240>>
2018-12-23 10:51:52,686 - MainThread - botocore.hooks - DEBUG - Event choosing-s3-sync-strategy: calling handler <bound method BaseSync.use_sync_strategy of <awscli.customizations.s3.syncstrategy.delete.DeleteSync object at 0x0000025A11687160>>
2018-12-23 10:51:52,726 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Users\adamdry\AppData\Local\Programs\Python\Python37\lib\site-packages\botocore\data\s3\2006-03-01\paginators-1.json
2018-12-23 10:51:52,728 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListObjectsV2: calling handler <function set_list_objects_encoding_type_url at 0x0000025A10DE1840>
2018-12-23 10:51:52,729 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListObjectsV2: calling handler <function validate_bucket_name at 0x0000025A10DE2598>
2018-12-23 10:51:52,732 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListObjectsV2: calling handler <bound method S3RegionRedirector.redirect_from_cache of <botocore.utils.S3RegionRedirector object at 0x0000025A0FF47BE0>>
2018-12-23 10:51:52,733 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListObjectsV2: calling handler <function generate_idempotent_uuid at 0x0000025A10DE21E0>
2018-12-23 10:51:52,734 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.ListObjectsV2: calling handler <function add_expect_header at 0x0000025A10DE2A60>
2018-12-23 10:51:52,735 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.ListObjectsV2: calling handler <bound method S3RegionRedirector.set_request_url of <botocore.utils.S3RegionRedirector object at 0x0000025A0FF47BE0>>
2018-12-23 10:51:52,735 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.ListObjectsV2: calling handler <function inject_api_version_header_if_needed at 0x0000025A10DE1F28>
2018-12-23 10:51:52,736 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=ListObjectsV2) with params: {'url_path': '/www.mywebsite.com?list-type=2', 'query_string': {'prefix': '', 'encoding-type': 'url'}, 'method': 'GET', 'headers': {'User-Agent': 'aws-cli/1.16.81 Python/3.7.2rc1 Windows/10 botocore/1.12.71'}, 'body': b'', 'url': 'https://s3.eu-west-1.amazonaws.com/www.mywebsite.com?list-type=2&prefix=&encoding-type=url', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x0000025A0FF4B668>, 'has_streaming_input': False, 'auth_type': None, 'encoding_type_auto_set': True, 'signing': {'bucket': 'www.mywebsite.com'}}}
2018-12-23 10:51:52,737 - MainThread - botocore.hooks - DEBUG - Event request-created.s3.ListObjectsV2: calling handler <function signal_not_transferring at 0x0000025A111AB400>
2018-12-23 10:51:52,742 - MainThread - botocore.hooks - DEBUG - Event request-created.s3.ListObjectsV2: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x0000025A0FF4B1D0>>
2018-12-23 10:51:52,744 - MainThread - botocore.hooks - DEBUG - Event choose-signer.s3.ListObjectsV2: calling handler <bound method ClientCreator._default_s3_presign_to_sigv2 of <botocore.client.ClientCreator object at 0x0000025A1191DD68>>
2018-12-23 10:51:52,744 - MainThread - botocore.hooks - DEBUG - Event choose-signer.s3.ListObjectsV2: calling handler <function set_operation_specific_signer at 0x0000025A10DE20D0>
2018-12-23 10:51:52,745 - MainThread - botocore.hooks - DEBUG - Event before-sign.s3.ListObjectsV2: calling handler <function fix_s3_host at 0x0000025A10C79488>
2018-12-23 10:51:52,745 - MainThread - botocore.utils - DEBUG - Checking for DNS compatible bucket for: https://s3.eu-west-1.amazonaws.com/www.mywebsite.com?list-type=2&prefix=&encoding-type=url
2018-12-23 10:51:52,746 - MainThread - botocore.utils - DEBUG - Not changing URI, bucket is not DNS compatible: www.mywebsite.com
2018-12-23 10:51:52,747 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2018-12-23 10:51:52,752 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
GET
/www.mywebsite.com
encoding-type=url&list-type=2&prefix=
host:s3.eu-west-1.amazonaws.com
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20181223T105152Z

host;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2018-12-23 10:51:52,753 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20181223T105152Z
20181223/eu-west-1/s3/aws4_request
d1166cbeb3eaddc78402f3790a360582ac7b1b692768b0686021bf20ae972562
2018-12-23 10:51:52,754 - MainThread - botocore.auth - DEBUG - Signature:
5ac884275598cd8e3088edd3508d8bd9fa2c67310a0b4c09408ba98c63ed5d9c
2018-12-23 10:51:52,755 - MainThread - botocore.hooks - DEBUG - Event request-created.s3.ListObjectsV2: calling handler <function signal_transferring at 0x0000025A111AB6A8>
2018-12-23 10:51:52,755 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://s3.eu-west-1.amazonaws.com/www.mywebsite.com?list-type=2&prefix=&encoding-type=url, headers={'User-Agent': b'aws-cli/1.16.81 Python/3.7.2rc1 Windows/10 botocore/1.12.71', 'X-Amz-Date': b'20181223T105152Z', 'X-Amz-Content-SHA256': b'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': b'AWS4-HMAC-SHA256 Credential=123/20181223/eu-west-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=5ac884275598cd8e3088edd3508d8bd9fa2c67310a0b4c09408ba98c63ed5d9c'}>
2018-12-23 10:51:52,757 - MainThread - urllib3.util.retry - DEBUG - Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2018-12-23 10:51:52,757 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): s3.eu-west-1.amazonaws.com:443
2018-12-23 10:51:52,910 - MainThread - urllib3.connectionpool - DEBUG - https://s3.eu-west-1.amazonaws.com:443 "GET /www.mywebsite.com?list-type=2&prefix=&encoding-type=url HTTP/1.1" 200 None
2018-12-23 10:51:52,913 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amz-id-2': 'S5luknDr/1xCISGRsn6hY3pzAA2LzMoYqFmAAmxFfLf7l5F2V9jFsVq/mgZOhmlhSlSdcNT0GHo=', 'x-amz-request-id': '40B5F675AB7B624C', 'Date': 'Sun, 23 Dec 2018 10:51:55 GMT', 'x-amz-bucket-region': 'eu-west-1', 'Content-Type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Server': 'AmazonS3'}
2018-12-23 10:51:52,916 - MainThread - botocore.parsers - DEBUG - Response body:
b'<?xml version="1.0" encoding="UTF-8"?>\n<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>www.mywebsite.com</Name><Prefix></Prefix><KeyCount>2</KeyCount><MaxKeys>1000</MaxKeys><EncodingType>url</EncodingType><IsTruncated>false</IsTruncated><Contents><Key>404.html</Key><LastModified>2018-12-23T10:50:30.000Z</LastModified><ETag>&quot;a9b2c6bfa33aa0b47de39dc1dae5c6b7&quot;</ETag><Size>145</Size><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>index.html</Key><LastModified>2018-12-23T10:50:29.000Z</LastModified><ETag>&quot;8fb308a37f7210dcbd848c18711f935c&quot;</ETag><Size>170</Size><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>'
2018-12-23 10:51:52,922 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.ListObjectsV2: calling handler <botocore.retryhandler.RetryHandler object at 0x0000025A0FF47DD8>
2018-12-23 10:51:52,929 - MainThread - botocore.retryhandler - DEBUG - No retry needed.
2018-12-23 10:51:52,931 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.ListObjectsV2: calling handler <bound method S3RegionRedirector.redirect_from_error of <botocore.utils.S3RegionRedirector object at 0x0000025A0FF47BE0>>
2018-12-23 10:51:52,933 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.ListObjectsV2: calling handler <function decode_list_object_v2 at 0x0000025A10DE1950>
2018-12-23 10:51:52,935 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.ListObjectsV2: calling handler <function enhance_error_msg at 0x0000025A115B4048>
2018-12-23 10:51:52,938 - Thread-1 - awscli.customizations.s3.results - DEBUG - Shutdown request received in result processing thread, shutting down result thread.

Iдолжно быть, что-то глупо!

Я пытался проверить, какой код завершения использует ECHO %errorlevel%, но, конечно, все команды после команды aws cli никогда не запускаются.

Я запускаю пакет изкомандная консоль, я нахожусь в каталоге, где существует пакетный файл, и просто используйте имя пакетного файла, чтобы выполнить его, например C:\Users\myuser\myproject>deployfe.bat

Редактировать:

Это также происходит с aws s3 rmи aws s3 cp команды.

Фактические команды работают должным образом - т. е. в корзине объекты создаются / удаляются, как и ожидалось.

1 Ответ

0 голосов
/ 23 декабря 2018

Поместите слово call перед aws s3 sync ...

Программа aws на самом деле является скриптом.Когда этот скрипт завершается, он завершает среду, что означает, что никакие дальнейшие команды не будут выполнятьсяДобавление вызова предотвращает это, так что следующая команда в вашем пакетном файле будет выполняться.

...