firespring / givesource

Other
13 stars 2 forks source link

Not installing from Cloudformation #12

Open elmarquis opened 4 years ago

elmarquis commented 4 years ago

Hi. Great project thanks for sharing. I have an issue when installing from the Cloudformation template. I get the CREATE FAILED message next to CustomStack, with the following error:

Embedded stack arn:aws:cloudformation:us-east-1:377656763260:stack/Givesource-CustomStack-1RAKCOP40NCRS/f76f3cc0-5e92-11ea-9395-0e403b617781 was not successfully created: The following resource(s) failed to create: [LambdaEdgeRole, GeneratePublicPagesHtmlConfigParameter, AdminPagesDeploy, SecureSettingsKey, CreateLambdaEdgeFunctionRole, HourlyScheduledEventRule, PublicPagesDeploy].

cjohara commented 4 years ago

I believe the Events log on the CustomStack will provide more context. You can see a previously failed stack with this URL: https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/stackinfo?filteringText=&filteringStatus=active&viewNested=false&hideStacks=false&stackId=<ARN>

Be sure to replace <ARN> with the arn of the stack. In your case, it is: arn:aws:cloudformation:us-east-1:377656763260:stack/Givesource-CustomStack-1RAKCOP40NCRS/f76f3cc0-5e92-11ea-9395-0e403b617781

efrandin commented 3 years ago

Not sure if this has been resolved. I am gettting the same issue. My logs are as follows:

image image image

guzzijones commented 1 year ago

I recieved this error in the custom stack deployent:

The following resource(s) failed to create: [CreateSecurityHeadersPublicPages, CreateSecurityHeadersAdminPages, GeneratePublicPagesHtml, AdminPagesDeploy, CreateSecurityHeadersUploads]. 

I found this in the cloud watch logs for CreateLambdaEdgeFunction

2023-04-01T16:19:54.831Z    21e8a984-72e3-467d-ab74-14c4232e86e2    INFO    ValidationException: 1 validation error detected: Value '2023/04/01/[$LATEST]fc2f4a4cab344e3897fe9983e054b3bf' at 'functionName' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
    at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)
    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:49:8)
    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12) {
  code: 'ValidationException',
  time: 2023-04-01T16:19:54.831Z,
  requestId: 'cf1a9f96-01c3-4878-99a2-ce909bc481d3',
  statusCode: 400,
  retryable: false,
  retryDelay: 9.833310625052238
}
guzzijones commented 1 year ago

looks like the node version is too old

2023-04-01T16:16:45.079Z    1070033c-c936-4430-a953-b1ac9187baae    INFO    InvalidParameterValueException: The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions.
    at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)
    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:49:8)
    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12) {
  code: 'InvalidParameterValueException',
  time: 2023-04-01T16:16:44.994Z,
  requestId: '763c54b0-07bd-45c6-81e9-60d68f592ce0',
  statusCode: 400,
  retryable: false,
  retryDelay: 98.55386327169452
}
guzzijones commented 1 year ago

looks like nodjs10 is in givesource-custom.yaml for a few lambdas. nodejs10 is no longer supported