Kiwi Rupela
Kiwi Rupela

Reputation: 2348

Is there any alternate to increase the aws lambda invoke time or pipe the result

my objective is to return a stream of mp3 file which will take more than 30s time so how can increase the limit of aws api gateway or is there any way to return the result before 30s or piping the result

here is my code

var url = 'http://youtube.com/watch?v=' + song.youtube_video.id;
        let audio = ytdl(url, { quality: 'lowest', filter: 'audioonly' });
        let musicStream = []
        audio.on('data', function (data) {
            musicStream.push(data);
        })
        audio.on('end', function (data) {
            callback(null, musicStream);
        })
    })
    .catch((err) => {
        callback("Music Lyrics Mismatch", null);
    }) 

Upvotes: 1

Views: 30

Answers (1)

Shivang Agarwal
Shivang Agarwal

Reputation: 1923

Not currently, 30 seconds is a hard limit. I would recommend implementing an asynchronous model/fork and join for these integrations if they cannot complete within 30 seconds.

Upvotes: 1

Related Questions