-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions Don't Mention Need for AWS Credentials #7
Comments
@bh2smith try this and if it works I'll update the README with instructions. Instructions for creating AWS credentials for s3 read access for the indexer (related link): Step 1: Sign in to the AWS Management Console Step 2: Navigate to IAM Dashboard Step 3: Create a New IAM User Step 4: Set Permissions Step 5: Review and Create User Step 6: (Optional) Restrict User Access to Specific S3 Buckets Step 7: Load AWS Credentials into Environment Variables For macOS or Linux:
To make these variables persist across sessions, you can add the above commands to your shell's profile script (e.g., ~/.bash_profile, ~/.bashrc, ~/.zshrc, etc.). |
Ok, so I got myself setup with the AWS credentials. However, now this service is producing a lot of botocore error logs. Like hundreds of these every second: Traceback (most recent call last):
File ".venv/lib/python3.12/site-packages/near_lake_framework/s3_fetchers.py", line 59, in fetch_shard_or_retry
response = await s3_client.get_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/aiobotocore/client.py", line 408, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.NoSuchKey: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist. This is happening on the commit before any of my PRs as well as still now. I tracked it down to response = await s3_client.get_object(
Bucket=s3_bucket_name,
Key="{:012d}/shard_{}.json".format(block_height, shard_id),
RequestPayer="requester",
) Does this have something to do with my AWS setup? Update: This appears to be a poorly handled exception in the frolvanya/near-lake-framework-py#11 The idea would be to handle the missing shard without spewing a bunch of dirty traces. except botocore.errorfactory.NoSuchKey:
logging.warning("Failed to fetch shard {}".format(shard_key))
except Exception:
traceback.print_exc() Just need to figure out how to import Update 2. Made a PR, but it doesn't seem like this project has active maintenance. If we don't hear anything in the next day or two there are two options:
I am in favour of item 2 (since its still a very small project). |
@bh2smith if you don't hear back from on the near-lake-framework-py PR soon, then we can migrate the repo to Rust since the https://github.com/near/near-lake-framework-rs repo is well maintained and Rust is the default for NEAR projects. FYI I might not have the bandwidth, but if I do I can do the rewrite. |
@bh2smith @anthony-near Hi, near-lake-framework-py maintainer is here. I've merged all PRs and updated the package on pypi. Sorry, it took longer than expected |
1. Drop CI python version to 3.11 (near lake framework doesn't work with 3.12) 2. Load .env in Makefile 3. [Minor] Fix enumeration in Readme 4. 🔑 Adapt main file to use latest near-lake-framework 5. Use >= on requirements file (also version bump near-lake-framework to 0.0.8) 6. Add AWS env details to readme (closes #7)
Its not clear from the instructions here or within this project what these AWS credentials are supposed to be. The code suggests these are credentials for the Near Lake Configuration.
gas-station-event-indexer/gas_station_event_indexer.py
Lines 135 to 136 in 5abd7a5
Where does one acquire these credentials?
The text was updated successfully, but these errors were encountered: