Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes cloudfront invalidation dynamic routing paths #258

Merged
merged 1 commit into from
Jan 15, 2022

Conversation

ky0615
Copy link
Contributor

@ky0615 ky0615 commented Jan 15, 2022

This PR fixes an error in the Lambda function of deploy-trigger.
There was an error during Cloudfront invalidation, and after checking the AWS documentation, I found that the specification was to pass absolute paths, not relative paths.

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects-paths

Stacktrace

2022-01-15T15:47:37.959Z	e2653e29-84ec-4192-9f19-cf60b77629d4	INFO	InvalidArgument: Your request contains one or more invalid invalidation paths.
    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_xml.js:53:29)
    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:688: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:690:12)
    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    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:688: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) {
  code: 'InvalidArgument',
  time: 2022-01-15T15:47:37.955Z,
  requestId: 'b154ef84-c4c4-4623-bda9-3dd0c9de75bd',
  statusCode: 400,
  retryable: false,
  retryDelay: 99.8402518545916
}

@ofhouse
Copy link
Member

ofhouse commented Jan 15, 2022

Good catch, thanks for the contribution!

@ofhouse ofhouse merged commit 5375213 into milliHQ:main Jan 15, 2022
@ofhouse ofhouse added this to the Next Iteration milestone Jan 15, 2022
@ofhouse
Copy link
Member

ofhouse commented Jan 15, 2022

This is now released in v0.11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants