0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

amplify configureでエラーが出た際の対処法

Posted at

AWS Hands-on for Beginners AWS Amplify を用いた Web サイトの構築方法を学ぼう」の実施中、
AWS Cloud9でamplify configureを実行した際に以下のエラーが発生しました。

$ amplify configure
Downloading release from https://package.cli.amplify.aws/10.4.0/amplify-pkg-linux-x64.tgz
node:internal/buffer:959
    super(bufferOrLength, byteOffset, length);
    ^

RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
    at new Uint8Array (<anonymous>)
    at new FastBuffer (node:internal/buffer:959:5)
    at createUnsafeBuffer (node:internal/buffer:1062:12)
    at allocate (node:buffer:415:10)
    at Function.allocUnsafe (node:buffer:380:10)
    at Function.concat (node:buffer:558:25)
    at Extract.<anonymous> (/home/ec2-user/.nvm/versions/node/v16.18.0/lib/node_modules/@aws-amplify/cli/lib/binary.js:127:37)
    at Extract.emit (node:events:525:35)
    at finishMaybe (/home/ec2-user/.nvm/versions/node/v16.18.0/lib/node_modules/@aws-amplify/cli/node_modules/readable-stream/lib/_stream_writable.js:624:14)
$ 

環境

  • Instance type:t3.small (2 GiB RAM + 2 vCPU)
  • Platform:Amazon Linux 2

対処法

インスタンスタイプを m5.large (8 GiB RAM + 2 vCPU)にして実行するとエラーが発生しませんでした。

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           7.6G        561M        6.5G        524K        502M        6.8G
Swap:          488M          0B        488M
$ 
$ amplify configure
Follow these steps to set up access to your AWS account:
Sign in to your AWS administrator account:
https://console.aws.amazon.com/
Press Enter to continue
:

ハンズオンでは t3.small を使用するよう案内がありましたが、もし同様の事象が発生したらお試しください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?