https://dagster.io/ logo
#dagster-support
Title
# dagster-support
b

BK

06/06/2022, 1:58 PM
Hello Eveyone. I am trying to connect to an s3 bucket. I am getting a no credentials error. This is my code
Copy code
from dagster import build_op_context, op,Field, String, job, resource,get_dagster_logger
from dagster_aws.s3 import s3_resource


@op(required_resource_keys={'s3'})
def example_s3_op(context):
    return context.resources.s3.list_objects_v2(
        Bucket='dagster_bucket',
        Prefix='dagster/'
    )


@job(resource_defs={'s3': s3_resource})
def example_job():
    example_s3_op()
j

johann

06/06/2022, 3:16 PM
Have you provided
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
env vars? https://docs.dagster.io/deployment/guides/aws#using-s3-for-io-management