AWS Amplify 강력 비추

Sungyong
5 min readJun 21, 2024

--

AWS의 BaaS(Backend as a service)인 Amplify로 프로젝트를 하게 되었다.

Firebase와 Supabase를 사용해봤기에 그냥 쓰면 될 줄 알았다.

전자는 설계 자체를 BaaS로 했지만, AWS Amplify는 전자를 따라해서 기존 서비스를 조합했다. 그래다 보니 인증은 Cognitor, Storage는 S3, Function은 Api gateway와 lambda, Realtime DB는 DynamoDB와 SQS를 패키지화한게 Amplify 이다.

그러다보니, 억지맞춤한 느낌이다.

일단 Web Console부터 봐보자.

amplify app branch 설정
설정 Review
CI/CD pipeline도 포함되어 있어, git push하면 자동 빌드와 deploy한다
access control
UI li도 library도 있다고 하여 살펴봤는데, 영 허접하다.

개발시 또 다른 시련은 최근 방식이 달라졌다. 기존 방식은 Gen1이라고 하여 deprecate되고, Gen2가 되어 하위호환되지 않는다. 그래서 기존 강의영상이나 참고 코드들을 사용하기 힘들다.

Gen1

Gen2

최종 절망한 지점은 여기서 부터..

amplify로 만든 function list 를 조회해려고 해봤다.

$amplify function list
⚠️ The Amplify CLI can NOT find command: function list
If you are trying to use Amplify Gen 2, install the @aws-amplify/backend-cli package or execute using the package name directly:
npx @aws-amplify/backend-clifunction list
  • 명령이 바뀌었다고 새로운 명령을 사용하라고 한다.

그래서 알려준대로 해 본다.

$npx @aws-amplify/backend-cli function list
InvalidCommandError: The Amplify Gen 2 CLI has been renamed to ampx
Resolution: Rerun using the ampx command name:
npx ampx function list
  • 그랬더니 또 바뀌었다고 또 다른 명령을 사용하라고 한다.

알려준 대로 또 다시 해 본다.

$npx ampx function list
ampx <command>
Commands:
ampx generate Generates post deployment artifacts
ampx sandbox Starts sandbox, watch mode for Amplify backend deplo
yments
ampx pipeline-deploy Command to deploy backends in a custom CI/CD pipelin
e. This command is not intended to be used locally.
ampx configure <command> Configure AWS Amplify
ampx info Generates information for Amplify troubleshooting
Options:
- version Show version number [boolean]
- debug Print debug logs to the console [boolean] [default: false]
- help Show help [boolean]
Unknown commands: function, list
  • 그런 명령은 없다고 한다.

개판이다.

--

--