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

Unable to set cache key from the request context #135

Closed
vmitsek-amplify opened this issue Mar 4, 2024 · 1 comment
Closed

Unable to set cache key from the request context #135

vmitsek-amplify opened this issue Mar 4, 2024 · 1 comment

Comments

@vmitsek-amplify
Copy link

When I trying to set cache key from request context the plugin always prepends method which leads to validation error during CF stack update: Invalid mapping expression specified: method.context.authorizer.principalId]. Is that a bug or I just using wrong mapping?
AWS documentation says that path to context does not start with method

caching:
    enabled: ${self:custom.config.is_caching_enabled}
    ttlInSeconds: 900
    cacheKeyParameters:
        - name: context.authorizer.principalId
@vmitsek-amplify
Copy link
Author

Adding mappedFrom helped

- name: integration.request.header.principalId
   mappedFrom: context.authorizer.principalId

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