Special needs virtual assistant
- Raspberry Pi 3 Model B
- 8GB or larger SD card
- Download the latest Pollexy image.
- Download and install Etcher.
- Use Etcher to burn the image to the SD card.
- After the image is burned, go to the root of the SD card and copy
settings.set.EXAMPLE
tosettings.set
. - Open the
settings.set
file and set thessid
,wpa-psk
, andhostname
to the correct values (just put a space between the key and the value).
Put the SD card and plug it in. As it boots up, it will automatically change the wi-fi settings/host name, and then reboot once.
Your IP address and login information is located here:
https://s3.amazonaws.com/pi-case/<hostname>
IMPORTANT: If this file doesn't exist, there may have been a problem with the wi-fi settings. Simply re-create the settings.set
file and reboot.
- Create a new user with this policy, and create an access/secret key.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"lex:GetBuiltinIntent",
"cloudformation:CreateUploadBucket",
"sqs:ListQueues",
"polly:*",
"cloudformation:ListStacks",
"lex:GetBots",
"logs:DescribeLogGroups",
"lex:GetBuiltinSlotTypes",
"cloudformation:EstimateTemplateCost",
"lex:GetIntents",
"cloudformation:PreviewStackUpdate",
"logs:DescribeExportTasks",
"lex:GetSlotTypes",
"s3:ListAllMyBuckets",
"cloudformation:DescribeAccountLimits",
"lex:PostText",
"s3:HeadBucket",
"cloudformation:DescribeChangeSet",
"lex:GetBuiltinIntents",
"cloudformation:ValidateTemplate",
"lex:PostContent"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "lex:*",
"Resource": [
"arn:aws:lex:*:*:bot:Pollexy*:*",
"arn:aws:lex:*:*:intent:Pollexy*:",
"arn:aws:lex:*:*:slottype:Pollexy*:*",
"arn:aws:lex:*:*:bot-channel:*:*:Pollexy*"
]
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": "lambda:*",
"Resource": "arn:aws:lambda:*:*:function:pollexy*"
},
{
"Sid": "VisualEditor3",
"Effect": "Allow",
"Action": "iam:*",
"Resource": "arn:aws:iam::*:policy/pollexy*"
},
{
"Sid": "VisualEditor4",
"Effect": "Allow",
"Action": "iam:*",
"Resource": "arn:aws:iam::*:role/pollexy*"
},
{
"Sid": "VisualEditor5",
"Effect": "Allow",
"Action": "logs:*",
"Resource": [
"arn:aws:logs:*:*:log-group:HandlerLogGroup",
"arn:aws:logs:*:*:log-group:/aws/lambda/pollexy*:*:*"
]
},
{
"Sid": "VisualEditor6",
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::pollexy*"
},
{
"Sid": "VisualEditor7",
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::pollexy*/*"
},
{
"Sid": "VisualEditor8",
"Effect": "Allow",
"Action": "cloudformation:*",
"Resource": "arn:aws:cloudformation:*:*:stack/pollexy*/*"
},
{
"Sid": "VisualEditor9",
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::pi-case/*",
"arn:aws:s3:::pi-case"
]
},
{
"Sid": "VisualEditor10",
"Effect": "Allow",
"Action": "dynamodb:*",
"Resource": [
"arn:aws:dynamodb:*:*:table/PollexyPeople",
"arn:aws:dynamodb:*:*:table/PollexyLocations",
"arn:aws:dynamodb:*:*:table/PollexyMessageLibrary",
"arn:aws:dynamodb:*:*:table/PollexyMessageSchedule"
]
},
{
"Sid": "VisualEditor11",
"Effect": "Allow",
"Action": "sqs:*",
"Resource": "arn:aws:sqs:*:*:pollexy*"
}
]
}
Amazon Pollexy
is pre-installed and every action uses the pollexy
command.
-
Login to the pi.
-
Go to
/root/Amazon-Pollexy
and run this command to update to the latest version:$ git reset --hard && git pull && ./update.sh
-
After you login, run this command to configure AWS security:
$ pollexy credentials configure ACCESS_KEY SECRET_KEY REGION
To keep it simple, Amazon Pollexy
wraps the necessary terraform commands so that it uses the right profile.
-
Login to the pi.
-
Change to the
Amazon Pollexy
folder:$ cd /root/Amazon-Pollexy
-
Run this command to run the terraform plan to verify that everything will build properly:
$ pollexy terraform plan
IMPORTANT: If you see any error messages, verify your credentials and double-check that the user policy matches the above policy.
-
Run this command to build the environment:
$ pollexy terraform apply
-
Verify that everything installed buy running:
$ pollexy person list There are no users in the system.
-
Deploy the Lambda function:
$ pollexy serverless deploy