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 fails to apply policies #133

Open adambarthelson opened 6 years ago

adambarthelson commented 6 years ago

When using the createResources.sh script, it's failing to capture the generated pool ids required for later commands.

Example output:

→ ./createResources.sh
Enter the name for your resources (must be all lowercase with no spaces) and press [ENTER]: name
All AWS resources will be created with [name] 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
IAM unauthenticated role successfully created
IAM authenticated role successfully created

An error occurred (MalformedPolicyDocument) when calling the PutRolePolicy operation: Resource  must be in ARN format or "*".
Created user pool with an id of
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --user-pool-id: expected one argument
Created user pool client with id of
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --identity-pool-id: expected one argument
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --identity-pool-id: expected one argument
Using the existing S3 bucket ...
Building the project
Date: 2018-04-04T02:09:41.901Z

This requires a lot of manual fixing in the AWS console. Fix please?

osloxen commented 6 years ago

I hit this when I had '-' character in my project name. I got past it by removing all special characters.