amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 304 forks source link

./createResources.sh Error parsing parameter #95

Closed chris86 closed 7 years ago

chris86 commented 7 years ago

I keep geting this error

$ ./createResources.sh Enter the name for your resources (must be all lowercase with no spaces) and press [ENTER]: snoop786 All AWS resources will be created with [snoop786] as part of their name 1) Elastic Beanstalk 2) S3 3) Quit Where would you like to deploy your application? 2 DynamoDB table successfully created Created an identity pool with id of us-east-1:cc3f5786-24bc-4ffd-af69-b503330f889f

Error parsing parameter '--assume-role-policy-document': Unable to load paramfile file:///tmp/unauthrole-trust-policy.json: [Errno 2] No such file or directory: u'tmp/unauthrole-trust-policy.json' Using the existing role ...

An error occurred (NoSuchEntity) when calling the GetRole operation: Role not found for snoop786-unauthenticated-role

Error parsing parameter '--policy-document': Unable to load paramfile file:///tmp/unauthrole-trust-policy.json: [Errno 2] No such file or directory: u'tmp/unauthrole-trust-policy.json'

An error occurred (NoSuchEntity) when calling the PutRolePolicy operation: Role not found for snoop786-unauthenticated-role

Error parsing parameter '--assume-role-policy-document': Unable to load paramfile file:///tmp/authrole-trust-policy.json: [Errno 2] No such file or directory: u'tmp/authrole-trust-policy.json' Using the existing role ...

An error occurred (NoSuchEntity) when calling the GetRole operation: Role not found for snoop786-authenticated-role

Error parsing parameter '--policy-document': Unable to load paramfile file:///tmp/authrole-trust-policy.json: [Errno 2] No such file or directory: u'tmp/authrole-trust-policy.json'

Error parsing parameter '--policy-document': Unable to load paramfile file:///tmp/authrole.json: [Errno 2] No such file or directory: u'tmp/authrole.json' Created user pool with an id of us-east-1_SBqc6GdWZ Created user pool client with id of 2n1omnnas3njm2d7v8i6ibgdi

Parameter validation failed: Invalid length for parameter Roles.unauthenticated, value: 0, valid range: 20-inf Invalid length for parameter Roles.authenticated, value: 0, valid range: 20-inf make_bucket: cognitosample-snoop786 S3 bucket successfully created. Uploading files to S3.

Error parsing parameter '--policy': Unable to load paramfile file:///tmp/s3-bucket-policy.json: [Errno 2] No such file or directory: u'/tmp/s3-bucket-policy.json' Building the project Hash: 17875153a96eda9e2bed Time: 13644ms chunk {0} main.bundle.js, main.bundle.js.map (main) 88.7 kB {2} [initial] [rendered] chunk {1} styles.bundle.js, styles.bundle.js.map (styles) 10.7 kB {3} [initial] [rendered] chunk {2} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.38 MB [initial] [rendered] chunk {3} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered] /c/Users/Rob/Desktop/awsapp/aws Syncing files to the S3 bucket from /c/Users/Rob/Desktop/awsapp/dist/ upload: ..\dist\assets\css\login-form.css to s3://cognitosample-snoop786/assets/css/login-form.css upload: ..\dist\assets\css\starter.css to s3://cognitosample-snoop786/assets/css/starter.css upload: ..\dist\assets\css\sb-admin-2.min.css to s3://cognitosample-snoop786/assets/css/sb-admin-2.min.css upload: ..\dist\assets\css\font-awesome.min.css to s3://cognitosample-snoop786/assets/css/font-awesome.min.css upload: ..\dist\assets\css\bootstrap-theme.min.css to s3://cognitosample-snoop786/assets/css/bootstrap-theme.min.css upload: ..\dist\assets\fonts\fontawesome-webfont.svg to s3://cognitosample-snoop786/assets/fonts/fontawesome-webfont.svg upload: ..\dist\assets\fonts\fontawesome-webfont.eot to s3://cognitosample-snoop786/assets/fonts/fontawesome-webfont.eot upload: ..\dist\assets\fonts\FontAwesome.otf to s3://cognitosample-snoop786/assets/fonts/FontAwesome.otf upload: ..\dist\assets\fonts\fontawesome-webfont.woff2 to s3://cognitosample-snoop786/assets/fonts/fontawesome-webfont.woff2 upload: ..\dist\assets\css\bootstrap.min.css to s3://cognitosample-snoop786/assets/css/bootstrap.min.css upload: ..\dist\assets\ui-js\bootstrap.min.js to s3://cognitosample-snoop786/assets/ui-js/bootstrap.min.js upload: ..\dist\assets\fonts\fontawesome-webfont.ttf to s3://cognitosample-snoop786/assets/fonts/fontawesome-webfont.ttf upload: ..\dist\assets\ui-js\sb-admin-2.min.js to s3://cognitosample-snoop786/assets/ui-js/sb-admin-2.min.js upload: ..\dist\assets\fonts\fontawesome-webfont.woff to s3://cognitosample-snoop786/assets/fonts/fontawesome-webfont.woff upload: ..\dist\assets\ui-js\metisMenu.min.js to s3://cognitosample-snoop786/assets/ui-js/metisMenu.min.js upload: ..\dist\assets\img\intro-bg.jpg to s3://cognitosample-snoop786/assets/img/intro-bg.jpg upload: ..\dist\favicon.ico to s3://cognitosample-snoop786/favicon.ico upload: ..\dist\assets\ui-js\jquery.min.js to s3://cognitosample-snoop786/assets/ui-js/jquery.min.js upload: ..\dist\index.html to s3://cognitosample-snoop786/index.html upload: ..\dist\inline.bundle.js.map to s3://cognitosample-snoop786/inline.bundle.js.map upload: ..\dist\inline.bundle.js to s3://cognitosample-snoop786/inline.bundle.js upload: ..\dist\styles.bundle.js.map to s3://cognitosample-snoop786/styles.bundle.js.map upload: ..\dist\styles.bundle.js to s3://cognitosample-snoop786/styles.bundle.js upload: ..\dist\main.bundle.js.map to s3://cognitosample-snoop786/main.bundle.js.map upload: ..\dist\main.bundle.js to s3://cognitosample-snoop786/main.bundle.js upload: ..\dist\vendor.bundle.js to s3://cognitosample-snoop786/vendor.bundle.js upload: ..\dist\vendor.bundle.js.map to s3://cognitosample-snoop786/vendor.bundle.js.map Region: us-east-1 DynamoDB: LoginTrailsnoop786 Bucket name: cognitosample-snoop786 Identity Pool name: snoop786 Identity Pool id: us-east-1:cc3f5786-24bc-4ffd-af69-b503330f889f Finished AWS resource creation. Status: SUCCESS

chris86 commented 7 years ago

I didnt find a solution to the problem but I found a workaround . Installed VM with Ubuntu with everthing needed and the script worked perfectly on there

vbudilov commented 7 years ago

Did you initially run the script on Windows?

chris86 commented 7 years ago

@vbudilov yes on windows 10

vbudilov commented 7 years ago

Yes, this code will work only on a mac and linux. I'll need to update the README with this info.