How to fix the AWS code-build apt-get update exit status 100 for react application to upload on s3

Question:

I have reactJs application and using AWS s3 to deploy static site. I’ve setup AWS code build for CI/CD. I’m using bitbucket and when any PR merge to master branch Web-hook comes into picture to trigger react application build and upload build on s3.

It was working fine for last 2 years but in last build I got a below error.

W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging yarn@dan.cx
E: The repository ‘https://dl.yarnpkg.com/debian stable InRelease’ is not signed.

[Container] 2021/02/04 07:39:02 Command did not exit successfully
apt-get update exit status 100 [Container] 2021/02/04 07:39:02 Phase
complete: INSTALL State: FAILED [Container] 2021/02/04 07:39:02 Phase
context status code: COMMAND_EXECUTION_ERROR Message: Error while
executing command: apt-get update. Reason: exit status 100

Here is the full log output.

enter image description here

here is the buildspec.yml file

Answer:

The signing key it complains about on line 82, what happens when you install it before apt update? Like suggested here: https://github.com/yarnpkg/yarn/issues/7866

Leave a Reply