0

I am getting the following error when using an AWS managed image for Windows :-

[Container] 2019/09/13 14:48:54 Command did not exit successfully aws s3 cp --recursive s3://unique-bucket-name/folder/ C:\temp\folder exit status 1

[Container] 2019/09/13 14:48:58 Phase complete: PRE_BUILD State: FAILED

[Container] 2019/09/13 14:48:58 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: aws s3 cp --recursive s3://unique-bucket-name/folder/ C:\temp\folder. Reason: exit status 1

The aws s3 cp command runs fine for another command which pulls from a different S3 bucket (size: 4.2 GB, # of objects 1,526). For this particular bucket (size: 4.6 GB, # of objects 2,06,462), the cp command seems to be able to execute completely but the last step errors out with exit status 1.

There is no evident timeout issues as I have gone with default of 1 hour. The build run which errors out completes in ~25 minutes.

Can someone please help me fix this ?

TIA

Community
  • 1
  • 1
ZeroGraviti
  • 1,047
  • 2
  • 12
  • 28

1 Answers1

0

A few things you can try:

1) Check if bucket is configured with encryption key, try using command: $ aws s3 cp --sse aws:kms

... this uses default Server side encryption.

2) Add --debug to s3 cp command for some added debug output

shariqmaws
  • 8,152
  • 1
  • 16
  • 35
  • (1) The bucket has no encryption (2) `--debug` output didn't reveal anything new.. – ZeroGraviti Sep 18 '19 at 18:23
  • I have just gone ahead with a zip+download+unzip approach for now. The challenge was ref'ing the env var $CODEBUILD_SRC_DIR and how it is interpreted for aws cli commands and native os commandline. – ZeroGraviti Sep 19 '19 at 17:26