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

Deploy the needed AWS Resources using CloudFormation #111

Closed Nr18 closed 6 years ago

Nr18 commented 6 years ago

Converted all resources (S3 setup) to a CloudFormation template, if the template is merged i will add API Gateway support as a example.

vbudilov commented 6 years ago

Thanks...can you post the repo which I can clone and run the setup script?

Nr18 commented 6 years ago

Sure that would be https://github.com/Nr18/aws-cognito-angular2-quickstart

vbudilov commented 6 years ago

Here's what I'm getting:

/tmp/aws-cognito-angular2-quickstart/aws$ ./createResourcesCloudFormation.sh 
Enter the name for your resources (must be all lowercase with no spaces) and press [ENTER]: cloudformationAngular
Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - cloudformationAngular

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationAngular does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationAngular does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationAngular does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationAngular does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationAngular does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationAngular does not exist
Building the project
Hash: b5b16fd6f62ae09bf65f                                                               
Time: 14381ms
chunk    {0} main.bundle.js, main.bundle.js.map (main) 88.4 kB {2} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.js.map (styles) 9.77 kB {3} [initial] [rendered]
chunk    {2} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.89 MB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
Syncing files to the S3 bucket from  /tmp/aws-cognito-angular2-quickstart/dist/
fatal error: Parameter validation failed:
Invalid bucket name "": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$"
Region:  us-east-2
DynamoDB: 
Bucket name: 
Identity Pool name: 
Identity Pool id: 
User Pool id: 
User Pool Client id: 
Finished AWS resource creation. Status: SUCCESS

Navigate to  to see the result!
Nr18 commented 6 years ago
Enter the name for your resources (must be all lowercase with no spaces) and press [ENTER]: cloudformationAngular

So it states: must be all lowercase with no spaces and you used: cloudformationAngular that could be the cause of the failure... That being said i could add a regex on it to ensure lowercasing

vbudilov commented 6 years ago

Rushed through the instructions -- others might too :) BTW, note the output: Invalid bucket name "": Bucket name must match the regex "^[a-zA-Z0-9.-_]{1,255}$"

Let me re-run it again either way.

vbudilov commented 6 years ago

Same thing:

/tmp/aws-cognito-angular2-quickstart/aws$ ./createResourcesCloudFormation.sh 
Enter the name for your resources (must be all lowercase with no spaces) and press [ENTER]: cloudformationcognito 
Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - cloudformationcognito

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationcognito does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationcognito does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationcognito does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationcognito does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationcognito does not exist

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id cloudformationcognito does not exist
Building the project
Hash: b5b16fd6f62ae09bf65f                                                               
Time: 13794ms
chunk    {0} main.bundle.js, main.bundle.js.map (main) 88.4 kB {2} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.js.map (styles) 9.77 kB {3} [initial] [rendered]
chunk    {2} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.89 MB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
Syncing files to the S3 bucket from  /tmp/aws-cognito-angular2-quickstart/dist/
fatal error: Parameter validation failed:
Invalid bucket name "": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$"
Region:  us-east-2
DynamoDB: 
Bucket name: 
Identity Pool name: 
Identity Pool id: 
User Pool id: 
User Pool Client id: 
Finished AWS resource creation. Status: SUCCESS

Navigate to  to see the result!
vbudilov commented 6 years ago

Closing due to inactivity.