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

Look for the most optimum & cost-effective way to run cache invalidation for cloudfront #5

Open
ashwanth1109 opened this issue Nov 8, 2020 · 1 comment
Assignees

Comments

@ashwanth1109
Copy link
Owner

Reference:
deploy/scripts/cache-invalidation.ts:29

const params: CreateInvalidationRequest = {
    DistributionId: findCNDistribution?.Id || "",
    InvalidationBatch: {
      CallerReference: new Date().toISOString(),
      Paths: {
        Quantity: 1,
          /**
           * TODO: Identify / experiment to understand if we need to invalidate everything to reflect changes
           * 
           */
        Items: ["*"],
      },
    },
  };

  await cloudfront.createInvalidation(params).promise();
@ashwanth1109 ashwanth1109 self-assigned this Nov 8, 2020
@ashwanth1109
Copy link
Owner Author

ashwanth1109 commented Nov 8, 2020

Update: Items: ["*"], doesnt work. using Items: ["/"], instead

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

No branches or pull requests

1 participant