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 thewifi-name
,wifi-key
, 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":[
"cloudformation:CreateUploadBucket",
"cloudformation:ListStacks",
"cloudformation:EstimateTemplateCost",
"cloudformation:PreviewStackUpdate",
"cloudformation:DescribeAccountLimits",
"cloudformation:DescribeChangeSet",
"cloudformation:ValidateTemplate",
"logs:DescribeExportTasks",
"logs:DescribeLogGroups",
"s3:ListAllMyBuckets",
"s3:HeadBucket",
"sqs:ListQueues"
],
"Resource":"*"
},
{
"Sid":"VisualEditor1",
"Effect":"Allow",
"Action":"lambda:*",
"Resource":"arn:aws:lambda:*:*:function:pollexy*"
},
{
"Sid":"VisualEditor2",
"Effect":"Allow",
"Action":"iam:*",
"Resource":"arn:aws:iam::*:policy/pollexy*"
},
{
"Sid":"VisualEditor3",
"Effect":"Allow",
"Action":"iam:*",
"Resource":"arn:aws:iam::*:role/pollexy*"
},
{
"Sid":"VisualEditor4",
"Effect":"Allow",
"Action":"logs:*",
"Resource":[
"arn:aws:logs:*:*:log-group:HandlerLogGroup",
"arn:aws:logs:*:*:log-group:/aws/lambda/pollexy*:*:*"
]
},
{
"Sid":"VisualEditor5",
"Effect":"Allow",
"Action":"s3:*",
"Resource":"arn:aws:s3:::pollexy*"
},
{
"Sid":"VisualEditor6",
"Effect":"Allow",
"Action":"s3:*",
"Resource":"arn:aws:s3:::pollexy*/*"
},
{
"Sid":"VisualEditor7",
"Effect":"Allow",
"Action":"cloudformation:*",
"Resource":"arn:aws:cloudformation:*:*:stack/pollexy*/*"
},
{
"Sid":"VisualEditor8",
"Effect":"Allow",
"Action":"s3:*",
"Resource":[
"arn:aws:s3:::pi-case/*",
"arn:aws:s3:::pi-case"
]
},
{
"Sid":"VisualEditor9",
"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":"VisualEditor10",
"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.
-
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/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:
$ serverless deploy --profile pollexy --region REGION