# M2M Auth0 and AWS

**URL:** <https://community.auth0.com/t/m2m-auth0-and-aws/43586>\
**Category:** Get Help\
**Created:** [May 25, 2020, 2:45pm UTC](https://community.auth0.com/t/m2m-auth0-and-aws/43586 "2020-05-25T14:45:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstasiuk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cstasiuk/32/21507_2.png) [@cstasiuk](https://community.auth0.com/u/cstasiuk)\
**Post date:** [May 25, 2020, 2:45pm UTC](https://community.auth0.com/t/m2m-auth0-and-aws/43586/1 "2020-05-25T14:45:19Z")

</div>

Good Morning

Looking for some best practice advice.

Example use case:  
Customer uploads txt files (via AWS CLI and a scheduled job) from their on-prem server into our AWS S3 bucket that triggers a lambda to process the file.

Currently an AWS user and secret key are provided and the customer is given permissions to rotate their keys according to their security policies.

Enter Auth0… We are integrating with Auth0 and are trying to find documentation around a best practice way to incorporate Auth0 in this M2M style of use case.

I found this:

> [@Access aws s3 objects using auth0](http://community.auth0.com/t/access-aws-s3-objects-using-auth0/34998):
>
> How to access AWS S3 objects using Auth0? I checked [https://auth0.com/docs/integrations/aws/tokens](https://auth0.com/docs/integrations/aws/tokens) but it uses delegation which is deprecated, is there any alternative way to access s3? Our requirement: Users login to our site using Auth0, we want to provide these users access to our data present in S3 bucket.

but that is assuming that a user is logging in to do the upload (which is a valid use case) but the use-case I’m looking for some guidance on is when the customer uploads these files via automated scheduled job/service.

I also found this:

> **[Using Machine to Machine (M2M) Authorization](https://auth0.com/blog/using-m2m-authorization/)**
>
> How to set up non-interactive apps using the client credentials grant and Auth0 to perform IoT device, CLI tool, and more machine to mach...

but if we’re handing out the client ID and secret (and identifier) I’m struggling to find out what we’re gaining here over handing out an IAM access key and secret key?

I mean I guess an intruder would then need the AWS keys and the Auth0 keys but I have to be missing something no?
