opticon
opticon

Reputation: 3594

CodeDeploy Error: "The revision size is too large. Its maximum size is 51200B."

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?

Upvotes: 4

Views: 1320

Answers (1)

Rafael Barros
Rafael Barros

Reputation: 1053

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.

Upvotes: 0

Related Questions