Closed avidant closed 1 year ago
Hi avidant,
It looks like the Discord commands register lambda failed - which could be caused by invalid Discord App ID or Discord BOT token.
What did the Discord commands registration lambda's error log said?
The lambda's error log simply says that it timed out. Below is the error log in case I missed something
timestamp,message
1683455881272,"INIT_START Runtime Version: nodejs:18.v6 Runtime Version ARN: arn:aws:lambda:ap-south-1::runtime:a19cefba18c0aa228bfe71e81d95cc5aab18e4570e899b3cfd9f759f022c7f8c
"
1683455881480,"START RequestId: c0c2fd89-6da0-4857-a322-??? Version: $LATEST
"
1683455881503,"2023-05-07T10:38:01.503Z c0c2fd89-6da0-4857-a322-??? INFO register request: {
method: 'post',
url: 'https://discord.com/api/v10/applications/xxx/commands',
headers: {
Authorization: 'Bot xxx'
},
data: { name: 'mc_start', type: 1, description: 'Start the server' }
}
"
1683455882904,"2023-05-07T10:38:02.904Z c0c2fd89-6da0-4857-a322-??? INFO register response: {
id: 'xxx',
application_id: 'xxx',
version: 'xxx',
default_member_permissions: null,
type: 1,
name: 'mc_start',
name_localizations: null,
description: 'Start the server',
description_localizations: null,
dm_permission: true,
contexts: null,
nsfw: false
}
"
1683455882905,"2023-05-07T10:38:02.905Z c0c2fd89-6da0-4857-a322-??? INFO register request: {
method: 'post',
url: 'https://discord.com/api/v10/applications/xxx/commands',
headers: {
Authorization: 'Bot xxx'
},
data: { name: 'mc_stop', type: 1, description: 'Stop the server' }
}
"
1683455883388,"2023-05-07T10:38:03.388Z c0c2fd89-6da0-4857-a322-??? INFO register response: {
id: 'xxx',
application_id: 'xxx',
version: 'xxx',
default_member_permissions: null,
type: 1,
name: 'mc_stop',
name_localizations: null,
description: 'Stop the server',
description_localizations: null,
dm_permission: true,
contexts: null,
nsfw: false
}
"
1683455883388,"2023-05-07T10:38:03.388Z c0c2fd89-6da0-4857-a322-??? INFO register request: {
method: 'post',
url: 'https://discord.com/api/v10/applications/xxx/commands',
headers: {
Authorization: 'Bot xxx'
},
data: {
name: 'mc_restart',
type: 1,
description: 'Restart the server system service'
}
}
"
1683455883846,"2023-05-07T10:38:03.846Z c0c2fd89-6da0-4857-a322-??? INFO register response: {
id: 'xxx',
application_id: 'xxx',
version: 'xxx',
default_member_permissions: null,
type: 1,
name: 'mc_restart',
name_localizations: null,
description: 'Restart the server system service',
description_localizations: null,
dm_permission: true,
contexts: null,
nsfw: false
}
"
1683455883846,"2023-05-07T10:38:03.846Z c0c2fd89-6da0-4857-a322-??? INFO register request: {
method: 'post',
url: 'https://discord.com/api/v10/applications/xxx/commands',
headers: {
Authorization: 'Bot xxx'
},
data: {
name: 'mc_backup',
type: 1,
description: 'Stop the server and make a backup'
}
}
"
1683455884323,"2023-05-07T10:38:04.323Z c0c2fd89-6da0-4857-a322-??? INFO register response: {
id: 'xxx',
application_id: 'xxx',
version: 'xxx',
default_member_permissions: null,
type: 1,
name: 'mc_backup',
name_localizations: null,
description: 'Stop the server and make a backup',
description_localizations: null,
dm_permission: true,
contexts: null,
nsfw: false
}
"
1683455884324,"2023-05-07T10:38:04.324Z c0c2fd89-6da0-4857-a322-??? INFO register request: {
method: 'post',
url: 'https://discord.com/api/v10/applications/xxx/commands',
headers: {
Authorization: 'Bot xxx'
},
data: {
name: 'mc_backup_download',
type: 1,
description: 'Get the latest backup'
}
}
"
1683455884486,"2023-05-07T10:38:04.485Z c0c2fd89-6da0-4857-a322-??? Task timed out after 3.01 seconds
"
1683455884486,"END RequestId: c0c2fd89-6da0-4857-a322-???
"
1683455884486,"REPORT RequestId: c0c2fd89-6da0-4857-a322-??? Duration: 3005.90 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 82 MB Init Duration: 207.39 ms
"
1683455884567,"INIT_START Runtime Version: nodejs:18.v6 Runtime Version ARN: arn:aws:lambda:ap-south-1::runtime:a19cefba18c0aa228bfe71e81d95cc5aab18e4570e899b3cfd9f759f022c7f8c
"
This could be it simply timeout:
mc_backup_download
, doesn't have a response. Can you try to increase the lambda timeout time and try again?
Could you let me know how to do that? I have no experience with CloudFormation
Just update the timeout setting from the lambda settings and use the "Test" button to re-run the lambda.
Don't need to re-deploy I think.
The function seems to have gotten deleted in the rollback
Oh... then we will need to re-deploy it.
Can you add timeout: Duration.seconds(30)
to here, run npx cdk list
to confirm the build still pass and re-deploy again?
Update:
Discord register lambda time-out duration has been increased to 30 seconds in the 1.2.0
release.
Closing issue as this is likely resolved, but please don't hesitate let me know if there's any update!
I tried deploying with a brand new AWS account.
I do have multiple AWS account credentials on my laptop so I used the correct profile (passing the --profile) tag
Pre requisites
Terminal Log
AWS CloudFormation