withPersistanceAdapter追加

This commit is contained in:
ろむねこ 2024-07-16 09:43:52 +09:00
parent 6afe962be6
commit 1081d220d8
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -139,5 +139,10 @@ exports.handler = Alexa.SkillBuilders.custom()
IntentReflectorHandler)
.addErrorHandlers(
ErrorHandler)
.withPersistenceAdapter(new DynamoDBPersistantAttributesAdapter.DynamoDbPersistenceAdapter({
tableName: process.env.DYNAMODB_PERSISTENCE_TABLE_NAME || 'ask-sdk-table',
createTable: false,
dynamoDBClient: new AWS.DynamoDB({apiVersion: 'latest', region: process.env.DYNAMODB_PERSISTENCE_REGION})
}))
.withCustomUserAgent('sample/hello-world/v1.2')
.lambda();