4

I'm trying to set up a deployment process as follows: Travis-CI.com grabs the codebase (NodeJS), builds and tests it, uploads it to S3 as a zip and then kicks off a CodeDeploy deployment (ECS). Here is my .travis.yml:

language: node_js
node_js:
- '12'

before_deploy:
  - zip -rq latest *
  - mkdir -p upload
  - mv latest.zip upload/latest.zip

deploy:
- provider: s3
  bucket: "myBucket"
  access_key_id:
    secure: keystuff
  secret_access_key:
    secure: keystuff
  local_dir: upload
  skip_cleanup: true
  on:
    branch: develop
- provider: codedeploy
  bucket: "myBucket"
  key: latest.zip
  bundle_type: zip
  application: "myApp"
  deployment_group: "myDeploymentGroup"
  region: "us-east-1"
  access_key_id:
    secure: keystuff
  secret_access_key:
    secure: keystuff
  on:
    branch: develop

My appspec.yml (Truth be told I'm not sure what should go in here.):

version: 0.0
os: linux

The upload to S3 succeeds, but the deployment task fails with the following error:

The revision size is too large. Its maximum size is 51200B.

I see this error under CodeDeploy > Deployments > DeploymentID.

Not sure what I'm doing wrong here - any insight?

Justin
  • 42,475
  • 9
  • 93
  • 111
opticon
  • 3,494
  • 5
  • 37
  • 61

1 Answers1

0

I had the same problem. The issue was because our zipped code in S3 passed the 51kb limit. My zipped code is 62kb. I deleted some files, tested it again, and it worked.

Rafael Barros
  • 1,043
  • 18
  • 25
  • 1
    So what, AWS CodeDeploy only lets you deploy apps with max 51kb of source code? It sounds ridiculous , I got same error, but I am using CodeCommit and CodeBuild. – kaktusas2598 Nov 15 '19 at 17:26