# Machine-to-machine access tokens in a Serverless architecture

**URL:** <https://community.auth0.com/t/machine-to-machine-access-tokens-in-a-serverless-architecture/77672>\
**Category:** Get Help\
**Created:** [February 4, 2022, 9:24am UTC](https://community.auth0.com/t/machine-to-machine-access-tokens-in-a-serverless-architecture/77672 "2022-02-04T09:24:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![walterholohan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/walterholohan/32/34956_2.png) [@walterholohan](https://community.auth0.com/u/walterholohan)\
**Post date:** [February 4, 2022, 9:24am UTC](https://community.auth0.com/t/machine-to-machine-access-tokens-in-a-serverless-architecture/77672/1 "2022-02-04T09:24:41Z")

</div>

We are using AWS AppSync in a serverless architecture where AppSync invokes lambdas for its resolvers. We have one query that calls the Auth0 management API using the node Auth0 sdk so that we can link a users account. Seen as a new lambda is invoked every time a query is called from the client does this mean that a new machine-to-machine access token is created? We are on the starter plan so we don’t want to quickly use up our 1000 monthly token usage.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 22, 2022, 11:07pm UTC](https://community.auth0.com/t/machine-to-machine-access-tokens-in-a-serverless-architecture/77672/3 "2022-02-22T23:07:51Z")

</div>

Hi @walterholohan,

Welcome to the Auth0 Community!

> [@walterholohan](#):
>
> Seen as a new lambda is invoked every time a query is called from the client does this mean that a new machine-to-machine access token is created?

Unless you are providing a mechanism for caching the token, a new one is being issued.

> [@walterholohan](#):
>
> We are on the starter plan so we don’t want to quickly use up our 1000 monthly token usage.

If I understand you correctly, these tokens [won’t be counted towards your quota](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens#token-quotas).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 9, 2022, 11:08pm UTC](https://community.auth0.com/t/machine-to-machine-access-tokens-in-a-serverless-architecture/77672/4 "2022-03-09T23:08:07Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
