mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #226 from Hestia-Homes/main
Allowing all s3 permissions for predictions bucket for sapmodel
This commit is contained in:
commit
bafba8f4c6
2 changed files with 5 additions and 10 deletions
|
|
@ -399,17 +399,11 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
)
|
||||
|
||||
# Retrieve the predictions
|
||||
logger.info("Retrieving predictions from s3")
|
||||
test = read_csv_from_s3(
|
||||
bucket_name="retrofit-sap-predictions-{environment}".format(environment=get_settings().ENVIRONMENT),
|
||||
filepath=response["storage_filepath"]
|
||||
)
|
||||
|
||||
predictions = pd.DataFrame(read_csv_from_s3(
|
||||
bucket_name="retrofit-sap-predictions-{environment}".format(environment=get_settings().ENVIRONMENT),
|
||||
filepath=response["storage_filepath"]
|
||||
))
|
||||
|
||||
|
||||
# We round the predictions
|
||||
predictions["RDSAP_CHANGE"] = predictions["RDSAP_CHANGE"].astype(float).round(0)
|
||||
# Extract property_id and recommendation_id
|
||||
|
|
|
|||
|
|
@ -30,9 +30,10 @@ provider:
|
|||
# Allow reading and writing to PREDICTIONS_BUCKET
|
||||
- Effect: Allow
|
||||
Action:
|
||||
- s3:GetObject
|
||||
- s3:PutObject
|
||||
- s3:ListBucket
|
||||
- s3:*
|
||||
# - s3:GetObject
|
||||
# - s3:PutObject
|
||||
# - s3:ListBucket
|
||||
Resource:
|
||||
- arn:aws:s3:::${env:PREDICTIONS_BUCKET}
|
||||
- arn:aws:s3:::${env:PREDICTIONS_BUCKET}/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue