Deploy your static files to S3


Upload your static assets to an S3 bucket

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-awssum-deploy --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


In your project's Gruntfile, add a section named s3deploy to the data object passed into grunt.initConfig().

Type: String

Your AWS access key, mandatory.

Type: String

Your AWS secret, mandatory.

Type: String

The bucket to upload to, mandatory.

Type: Integer

How many concurrent connections to keep open while uploading to S3. Defaults to 3.

The project is based on awssum, and uses code from a gist by @chilts and @twhid.

  s3deploy: {
    options: {
      key: '<%= secret.awsKey %>',
      secret: '<%= secret.awsSecret %>',
      bucket: '<%= secret.awsBucket %>',
      access: 'public-read',
      connections: 5
    dist: {
      files: [{
        expand: true,
        cwd: 'dist/',
        src: '**/*.*',
        dest: './'

In lieu of a formal styleguide, take care to maintain the existing coding style.

  • 2013-07-28   v0.1.0   First release
  • 2013-07-28   v0.1.1   Added async queue and connections option
  • 2013-08-01   v0.1.2   Automatically set ContentType property on S3 using mime package