aws-samples/lambda-refarch-webapp

Unable to launch stack

imkheong opened this issue · 7 comments

Firstly, great effort in putting up the reference architecture, well done guys!

I have been trying to launch the stack recently to no avail.

I was using a user with admin role, and subsequently a root user (this is for my personal account, and I know this is a security risk). I used the default setting during the launch, I did not use IAM role to launch the stack.

This is the error when I click on the stack in Cloud Formation:

ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack serverless-web-refarch The following resource(s) failed to create: [DDBConfigTable, LambdaToDynamoDBUserTableRole, WebsiteBucket]. . Rollback requested by user.

What could be the issue and how can I get around the error?

Thanks!

@imkheong I am also facing same problem and my scenario is identical to yours.

@imkheong
Hi,
Changing
"Runtime": "nodejs" to "Runtime" : "nodejs4.3"
in
cognito-creation-helper.template and config-helper.template
solved my problem

Steps :

  1. Change "Runtime": "nodejs" to "Runtime" : "nodejs4.3" in all .template files
  2. Change TemplateURL to point to your custom .template files w.r.t to step 3 in serverless-web-master.template
  3. Upload template files to your account's S3 bucket
  4. Instead of clicking on "launch stack" button from lambda-refarch-webapp choose either of the following option
  • Upload a template to Amazon S3
  • Specify an Amazon S3 template URL

Still getting error on stack creation, I see that templates are already fixed to nodejs4.3.
I am getting below error
 20:02:24 UTC-0600 CREATE_FAILED AWS::S3::Bucket WebsiteBucket Property BucketName cannot be empty if specified.

@rohitanytime During stack creation, under the Specify Details page, the 'HostingBucket' field is empty, just put a random name. That resolved my issue.

The HostingBucket field needs to be filled in with an allowed name. A random name is fine if it's sufficiently random. From http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html: "A bucket name must be unique across all existing bucket names in Amazon S3. We recommend that all bucket names comply with DNS naming conventions." I finally put a timestamp at the end of mine.

Also, based on my experience getting this to work, DynamoDB table names need to be unique within an Amazon account. So if the stack creation fails you need to delete any partially-created stacks before trying again.

getting error for ConfigHelperStack...please help and advise

Embedded stack arn:aws:cloudformation:us-east-1:570585003507:stack/serverless-web-refarch-2-ConfigHelperStack-U9F0YSLGOX2J/b6b718b0-9827-11e9-8a12-0a3a983b5e88 was not successfully created: The following resource(s) failed to create: [AddConfigSetting].

  | Physical ID:arn:aws:cloudformation:us-east-1:570585003507:stack/serverless-web-refarch-2-ConfigHelperStack-U9F0YSLGOX2J/b6b718b0-9827-11e9-8a12-0a3a983b5e88