Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hang on deploy #112

Open
humanatwork opened this issue Oct 9, 2018 · 1 comment
Open

Hang on deploy #112

humanatwork opened this issue Oct 9, 2018 · 1 comment

Comments

@humanatwork
Copy link

Before anything, just want to say this library rocks. I've been using it regularly, and it's saved me a ridiculous amount of time!

That said, I've just run into a strange issue that seems to only occur with this particular Lambda function upon attempting to deploy — I've tested deployment on other recently created Lambdas and they all work just fine. When I run grunt deploy, grunt seems to simply hang indefinitely until the process is killed right after it begins packaging the zip (I'm new to Grunt so this might not actually be where the process is getting stuck, fyi). Here's a console readout for ref:

Running "lambda_package:default" (lambda_package) task
npm WARN peerDependencies The peer dependency [email protected] included from dynamodb-wrapper will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated [email protected]: no longer maintained
[email protected] ../../../../../../../../var/folders/gs/688nwl_57919sfz06c_rhhvm0000gn/T/1539121699197.6658/node_modules/lambda_parseTimezoneData
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
└── [email protected] ([email protected], @turf/[email protected], @turf/[email protected], [email protected], [email protected])

And here's my Gruntfile:

const grunt = require('grunt');

module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-aws-lambda');
    grunt.loadNpmTasks('grunt-exec');

    grunt.initConfig({
        exec: {
            default: {
                cmd: 'source ./auth.sh'
            }
        },
        lambda_invoke: {
            default: {
                arn: 'arn:aws:lambda:us-east-1:***********:function:lambda_parseTimezoneData',
                options: {
                    file_name: 'index.js',
                    event: 'event.json',
                    profile: 'flyright',
                    region: 'us-east-1'
                }
            }
        },
        lambda_deploy: {
            default: {
                arn: 'arn:aws:lambda:us-east-1:************:function:lambda_parseTimezoneData'
            }
        },
        lambda_package: {
            default: {
            }
        }
    });

    // Register local Lambda test task
    grunt.registerTask('default', ['exec', 'lambda_invoke']);

    // Register deploy task
    grunt.registerTask('deploy', ['lambda_package', 'lambda_deploy']);
}

Things to note: This file is identical to half-a-dozen others that all work and deploy just fine (several include the NPM dynamodb-wrapper warnings seen above); the only difference is the npm WARN deprecated text-encoding message — could that deep-level dependency be stopping Lambda from accepting the upload? Just an idea... — and the default local invocation action works as expected. One other possible point of interest here might be that I accidentally attempted to run the deploy action once before actually creating the lambda function in AWS. Of course, I went ahead and created it, but I'm wondering if that might have something to do with this. Any ideas?

@humanatwork
Copy link
Author

Didn't see this issue before, but possibly relevant: #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant