mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Added some documentation about generating presigned urls
This commit is contained in:
parent
0f6bfedd77
commit
c1c235510d
1 changed files with 7 additions and 0 deletions
|
|
@ -112,3 +112,10 @@ the JWT, and avoid the functionality defined in the signIn function as defined i
|
|||
**cypress/figtures/session.json** is a user fixture that is used to log in a user in the login tests
|
||||
|
||||
**cypress/support/commands.ts** creates a custom login user command which sets a JWT and allows us to actually authenticate. `cy.intercept` only mocks the client side behaviour of the apis and therefore does not set any cookies, do this function does this manually.
|
||||
|
||||
# Generating pre-signed urls
|
||||
|
||||
In our terraform stack, we have a module called `s3_presignable_bucket` which contains the definition for our bucket which we will use to store retrofit plan input csv's in.
|
||||
|
||||
We will generate a pre-signed url and then make a post request to that endpoint to store that data to s3. Part of that process is the creation of an AWS IAM role which contains
|
||||
the permission set to access the bucket, `rerofit-plan-inputs-<stage>`. The name of this IAM role is `s3_presign_role_<stage>` and for our NextJS application, as it's hosted outside of AWS (for the moment), we need to generate a set of access credentials to give the application access to this bucket. The access key and secret key are automatically generated and stored in AWS secrets manager under `dev/presign_frontend/access_key` and `dev/presign_frontend/secret_key` and need to be set in the environment for the pre-sign api to store csv data to aws.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue