Closed toshke closed 7 years ago
Will check the tests in upcoming days, and comply with coding conventions.
@toshke what do you think of https://github.com/Tim-B/grunt-aws-lambda/pull/103 ?
Thanks for your help
@piercus i've already opened https://github.com/Tim-B/grunt-aws-lambda/pull/102, including mocks tests and code that passes linter with success. As for https://github.com/Tim-B/grunt-aws-lambda/pull/103 - looking at https://github.com/Tim-B/grunt-aws-lambda/pull/103/files, I can't find place where s3 upload actually takes place.
@toshke
I'm not sure s3 upload should be done on grunt-aws-lambda, i'm suggesting to use grunt-aws-s3
for the upload.
On my point of view, to keep things granular, lambda_deploy should just be able to :
With this we can connect with grunt-aws-s3
see my example in
grunt.initConfig({
lambda_deploy: {
env: {
arn: 'arn:aws:lambda:us-east-1:123456781234:function:my-function',
s3_bucket: 'my-lambda-code-bucket',
s3_key_prefix: 'folderName'
}
},
lambda_package: {
env: {
options: {}
}
},
aws_s3: {
env: {
options: {
bucket: 'my-lambda-code-bucket'
},
files: [
{action: 'upload', expand: true, src: ['dist/**'], differential: true, dest: 'folderName'}
]
}
}
});
grunt.loadNpmTasks('grunt-aws-s3');
grunt.loadNpmTasks('grunt-aws-lambda');
grunt.registerTask('deploy', ['lambda_package', 'aws_s3', 'lambda_deploy']);
Support for uploading code via S3, rather than directly