This repository was archived by the owner on Nov 24, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-6
lines changed
Expand file tree Collapse file tree 2 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1+ if ( typeof process . env . AWS_REGION === 'undefined' ) {
2+ console . error ( `
3+ Please set the "AWS_REGION" environment variable to the AWS region to which you wish to deploy.
4+
5+ These are some cheap options:
6+
7+ Ireland: eu-west-1
8+ USA, Virginia: us-east-1
9+ USA, Oregon: us-west-2
10+
11+ For example:
12+
13+ export AWS_REGION=eu-west-1
14+ ` )
15+ process . exit ( 1 )
16+ }
17+
118if ( typeof process . env . AWS_IOT_HOST === 'undefined' ) {
219 console . error ( `
3- Please set the "AWS_IOT_HOST" environment variable to your region's AWS IoT Custom Endpoint.
20+ Please set the "AWS_IOT_HOST" environment variable to your ${
21+ process . env . AWS_REGION
22+ } region's AWS IoT Custom Endpoint.
423
524You can find it here:
6- https://eu-west-1.console.aws.amazon.com/iot/home#/settings
25+ https://eu-west-1.console.aws.amazon.com/iot/home?region=${
26+ process . env . AWS_REGION
27+ } #/settings
728Or with the AWS CLI:
8- aws iot describe-endpoint --output text
29+ aws iot describe-endpoint --output text --region ${ process . env . AWS_REGION }
30+
31+ For Example:
32+
33+ export AWS_REGION=replacethispart.iot.eu-west-1.amazonaws.com
34+
935` )
1036 process . exit ( 1 )
1137}
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ service: chromeless-serverless
33custom :
44 stage : dev
55 debug : " *"
6- awsIotHost : ${env:AWS_IOT_HOST}
6+ aws :
7+ iotHost : ${env:AWS_IOT_HOST}
8+ region : ${env:AWS_REGION}
79 chrome :
810 functions :
911 - run
@@ -12,10 +14,10 @@ provider:
1214 name : aws
1315 runtime : nodejs6.10
1416 stage : ${self:custom.stage}
15- region : eu-west-1
17+ region : ${self:custom.aws.region}
1618 environment :
1719 DEBUG : ${self:custom.debug}
18- AWS_IOT_HOST : ${self:custom.awsIotHost }
20+ AWS_IOT_HOST : ${self:custom.aws.iotHost }
1921 apiKeys :
2022 - ${self:custom.stage}-chromeless-session-key
2123 iamRoleStatements :
You can’t perform that action at this time.
0 commit comments