Skip to content

node 8.10 async dosen't working #426

Description

@aronsuarez

When I run this code:

const AWS = require('aws-sdk')
const s3 = new AWS.S3()
exports.handler = async function(event) {
const operation = event.operation
let expire = null
// Set expiration
if (event.expires && event.expires > 600) {
expire = 300
} else if (event.expires && event.expires < 600) {
expire = event.expires
} else {
expire = 300
}
const params = {
Bucket: event.bucket,
Key: event.key,
Metadata: event.metadata,
Expires: expire,
ContentType: event.contentType,
}
// Create URL
const url = s3.getSignedUrl(operation, params)
return url
}

I god no output in the terminal (when i run the same code with callback it works), when i set a console.log('xyz') a see the log on the console but the returnes value is not showed.

I use node8.10 as runtime and i have setted the runtime also in the .env file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions