Hello guys. This is probably a novice question, bu...
# ask-metaflow
f
Hello guys. This is probably a novice question, but I am reading the metaflow book chapter 7.2, and there is this "Setting up a table on Athena" section, which says:
make sure that your IAM user or Batch role (METAFLOW_ECS_S3_ACCESS_ IAM_ROLE in the Metaflow config) has a policy called AmazonAthenaFullAccess attached to it, which allows Athena queries to be executed. Also, make sure the AWS region is set in your configuration, for example, by setting the environment variable AWS_DEFAULT_REGION=us-east-1
How exactly set these AWS variables? Like in the AWS console or in the local config file? Thanks for any help in advance!
1
v
hi! Good question 🙂 Firstly, do you have Metaflow deployed on your AWS account?
f
Yes I do, I went through the CloudFormation route. And I can run my flow through AWS Batch
v
nice! 1. First, run
metaflow configure show | grep METAFLOW_ECS_S3_ACCESS_IAM_ROLE
2. Note the role name that it outputs (starting with
arn:awss:iam:
) 3. Log in to the AWS Console, navigate to IAM, find Roles, you should find the role there. 4. Edit the role and attach a policy called
AmazonAthenaFullAccess
to it.
you can set the region in
~/.aws/config
- for instance
Copy code
[default]
region=us-west-2
after this, you should be able to launch Athena queries from
@batch
tasks
let me know if it doesn't work
f
I think it works now. Thanks for the help ville!
🙌 1