# botocore.exceptions.NoCredentialsError: Unable to locate credentials in apache airflow

**URL:** <https://discourse.greatexpectations.io/t/botocore-exceptions-nocredentialserror-unable-to-locate-credentials-in-apache-airflow/1322>\
**Category:** GX Core Support\
**Created:** [August 8, 2023, 7:17am UTC](https://discourse.greatexpectations.io/t/botocore-exceptions-nocredentialserror-unable-to-locate-credentials-in-apache-airflow/1322 "2023-08-08T07:17:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erman](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@erman](https://discourse.greatexpectations.io/u/erman)\
**Post date:** [August 8, 2023, 7:17am UTC](https://discourse.greatexpectations.io/t/botocore-exceptions-nocredentialserror-unable-to-locate-credentials-in-apache-airflow/1322/1 "2023-08-08T07:17:32Z")

</div>

I’m running apache airflow 2.6.1 on an ubuntu VM inside docker. My gx stores are in a MinIO database and airflow and MinIO have access to each other.  
When I run the following python code from an outside system running ubuntu I get no issues:

> Blockquote  
> config\_data\_docs\_sites = {  
> “s3\_site”: {  
> “class\_name”: “SiteBuilder”,  
> “store\_backend”: {  
> “class\_name”: “TupleS3StoreBackend”,  
> “bucket”: “great-expectations”,  
> “prefix”: “data\_docs”,  
> “boto3\_options”: boto3\_options  
> }  
> },  
> }  
> data\_context\_config = DataContextConfig(store\_backend\_defaults=S3StoreBackendDefaults(default\_bucket\_name=GX\_BUCKET\_NAME),  
> data\_docs\_sites=config\_data\_docs\_sites  
> )  
> context = BaseDataContext(project\_config=data\_context\_config)  
> checkpoint = gx.checkpoint.SimpleCheckpoint(  
> name=f"{asset\_name.replace(‘/’, ‘\_’)}\_test",  
> data\_context=context,  
> validations=[  
> {  
> “batch\_request”: my\_batch\_request,  
> “expectation\_suite\_name”: expectation,  
> },  
> ],  
> )

```
    print("running expectations on: ", asset_name)
    checkpoint.run()

```

> Blockquote  
> All the validations are saved inside the validation store on MinIO. However running this inside airflow gives me the NoCredentialsError. The logs in airflow show that the datasource and all data assets are being saved. The error occurs during “checkpoint.run()”.
