Leo Qin
09/12/2022, 2:30 PMbotocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: The S3 location provided to save your query results is invalid. Please check your S3 location is correct and is in the same region and try again. If you continue to see the issue, contact customer support for further assistance.
, if I run the image and run it locally this error doesn't happen, any ideas what is happning?daniel
09/12/2022, 2:35 PMLeo Qin
09/12/2022, 2:39 PMAWS_ATHENA_OUTPUT_BUCKET
is set to s3://{bucket}/dbt/
daniel
09/12/2022, 2:42 PMLeo Qin
09/12/2022, 2:44 PMAWS_DEFAULT_REGION
and AWS_REGION
set to us-east-1daniel
09/12/2022, 2:47 PMdaniel
09/12/2022, 2:47 PMdaniel
09/12/2022, 2:48 PMLeo Qin
09/12/2022, 2:49 PMdaniel
09/12/2022, 2:52 PMdaniel
09/12/2022, 2:52 PMdaniel
09/12/2022, 2:54 PMLeo Qin
09/12/2022, 2:55 PMdagster_dbt.dbt_cloud_run_op
daniel
09/12/2022, 3:00 PMLeo Qin
09/12/2022, 3:01 PMAWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
during deploydaniel
09/12/2022, 3:01 PMLeo Qin
09/12/2022, 3:01 PMdaniel
09/12/2022, 3:03 PMLeo Qin
09/12/2022, 3:04 PMdocker run -it <tag> sh
then dbt build xyz
Leo Qin
09/12/2022, 3:05 PMLeo Qin
09/12/2022, 3:05 PMdaniel
09/12/2022, 3:11 PMLeo Qin
09/12/2022, 3:13 PMdagster_cloud_pre_install.sh
that gets copied, would that be a good place to do taht?daniel
09/12/2022, 3:20 PMdaniel
09/12/2022, 3:22 PMdaniel
09/12/2022, 3:24 PMLeo Qin
09/12/2022, 3:24 PMAWS_REGION
variable (and then default it to us-east-1
daniel
09/12/2022, 3:30 PMLeo Qin
09/12/2022, 3:30 PMdaniel
09/12/2022, 3:38 PMprha
09/12/2022, 3:43 PMdagster_cloud_pre_install.sh
or dagster_cloud_post_install.sh
, depending on how you want the image layer caching to work (whether or not it depends on the code being copied over first).prha
09/12/2022, 5:46 PM--env
arguments using the CLI? Can you confirm theyโre getting set correctly in the image?Leo Qin
09/12/2022, 5:46 PM--env
arguments; I can see them in the env when I run the imageLeo Qin
09/12/2022, 5:47 PMdaniel
09/12/2022, 6:15 PMLeo Qin
09/12/2022, 6:47 PMdagster job execute
) and it succeededLeo Qin
09/12/2022, 6:49 PMJoe
09/13/2022, 2:23 PM--env AWS_REGION=<your-region>
to the dagster-cloud deploy command?Leo Qin
09/13/2022, 2:24 PMJoe
09/13/2022, 3:01 PMLeo Qin
09/13/2022, 3:01 PMJoe
09/13/2022, 3:20 PMJoe
09/13/2022, 3:21 PMLeo Qin
09/13/2022, 3:23 PMJoe
09/13/2022, 3:26 PMJoe
09/13/2022, 3:28 PMLeo Qin
09/13/2022, 3:29 PMJoe
09/13/2022, 3:30 PMLeo Qin
09/13/2022, 3:31 PMJoe
09/13/2022, 3:33 PMLeo Qin
09/13/2022, 3:34 PMStartQueryExecution
from my source ip addressJoe
09/13/2022, 3:46 PMLeo Qin
09/13/2022, 3:47 PMJoe
09/13/2022, 3:48 PMJoe
09/13/2022, 3:49 PMJoe
09/13/2022, 3:53 PMLeo Qin
09/13/2022, 4:00 PMJoe
09/13/2022, 4:06 PMLeo Qin
09/13/2022, 4:06 PMLeo Qin
09/13/2022, 4:07 PMJoe
09/13/2022, 4:08 PMsts.get_caller_identity()
would be useful as well as something that gets logged to cloudtrail https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.htmlLeo Qin
09/13/2022, 4:52 PM"Boto3/1.24.63 Python/3.8.14 Linux/4.14.287-215.504.amzn2.x86_64 exec-env/AWS_ECS_FARGATE Botocore/1.27.71"
Joe
09/13/2022, 5:09 PMLeo Qin
09/13/2022, 5:12 PMLeo Qin
09/13/2022, 5:12 PMJoe
09/13/2022, 5:12 PMLeo Qin
09/15/2022, 5:00 PM-- /* {"app": "dbt", "dbt_version": "1.1.2", "profile_name": "data_infra_poc", "target_name": "dev", "connection_name": "list_awsdatacatalog"} */
select distinct schema_name
from awsdatacatalog.INFORMATION_SCHEMA.schemata
Joe
09/15/2022, 5:01 PMLeo Qin
09/15/2022, 5:02 PMJoe
09/15/2022, 5:02 PMLeo Qin
09/15/2022, 5:03 PMJoe
09/15/2022, 5:03 PMLeo Qin
09/15/2022, 5:04 PMJoe
09/15/2022, 5:05 PMLeo Qin
09/15/2022, 5:05 PMJoe
09/15/2022, 7:18 PMLeo Qin
09/15/2022, 7:20 PMus-west-2
Leo Qin
09/15/2022, 7:21 PMAWS_REGION=us-east-1
AWS_DEFAULT_REGION=us-east-1
daniel
09/15/2022, 7:22 PMLeo Qin
09/15/2022, 7:24 PMdbt-athena
creates an athena connection here (https://github.com/Tomme/dbt-athena/blob/83f775643ab6e1edea605bc3f187ef28c2d20947/dbt/adapters/athena/connections.py#L120-L172) which references pyathena.connection.Connection
here (https://github.com/laughingman7743/PyAthena/blob/master/pyathena/connection.py)Leo Qin
09/15/2022, 7:25 PMdaniel
09/15/2022, 7:26 PMLeo Qin
09/15/2022, 7:27 PMus-east-1
in my projectLeo Qin
09/15/2022, 7:27 PMAWS_REGION
environment variable)Leo Qin
09/15/2022, 7:27 PMdaniel
09/15/2022, 7:27 PMdaniel
09/15/2022, 7:28 PMdaniel
09/15/2022, 7:29 PMLeo Qin
09/15/2022, 7:29 PMself.region_name
here: https://github.com/laughingman7743/PyAthena/blob/7cb509d15605d1fa45a6d52c8f217b089fd92bf1/pyathena/connection.py#L138Leo Qin
09/15/2022, 7:29 PMLeo Qin
09/15/2022, 7:41 PMdaniel
09/15/2022, 7:41 PMLeo Qin
09/15/2022, 7:41 PMAWS_REGION
Leo Qin
09/15/2022, 7:41 PMJoe
09/15/2022, 7:41 PMdaniel
09/15/2022, 7:41 PMdaniel
09/15/2022, 7:42 PMLeo Qin
09/15/2022, 7:42 PMLeo Qin
09/15/2022, 7:43 PM