Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Snyder committed Apr 19, 2023
1 parent 00f8dcd commit 069d30c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/README.md
Expand Up @@ -89,6 +89,9 @@ First, setup all the necessary configuration.
"Effect": "Allow",
"Action": [
"lambda:UpdateFunctionCode",
"lambda:GetFunction",
"lambda:GetFunctionConfiguration",
"lambda:GetFunctionUrlConfig",
"lambda:InvokeFunction",
"lambda:CreateFunction",
"lambda:CreateFunctionUrlConfig",
Expand Down Expand Up @@ -285,7 +288,16 @@ make pytest-prod

Last step, deploy the React app to a S3 bucket. First, test the build process.

> Remember to set the correct endpoint in `app/.env.production` and `lambdas/todos/.env`
```sh
# get the function URL
aws lambda get-function-url-config --function-name <your_function_name>
# or,
make lambda-get-url
```

> Remember to set the correct endpoint in `app/.env.production`
> Currently, in the frontend, the VITE URL has to end with `/new_todo`
```sh
# from the frontend directory
Expand Down Expand Up @@ -322,5 +334,6 @@ Update CI/CD
- so that all the environment variables and policies are set
- edit `.github/workflows/deploy.yml`
- set all the correct environment variables
- set all the correct variables in Github Actions
- modify code
- push to/merge with `main`
- push to or merge with `main`
3 changes: 3 additions & 0 deletions lambdas/todos/Makefile
Expand Up @@ -81,6 +81,9 @@ lambda-url:
--function-name "$(LAMBDA_FUNCTION_NAME)" \
--auth-type NONE

lambda-get-url:
aws lambda get-function-url-config --function-name "$(LAMBDA_FUNCTION_NAME)"

lambda-public:
aws lambda add-permission \
--function-name "$(LAMBDA_FUNCTION_NAME)" \
Expand Down

0 comments on commit 069d30c

Please sign in to comment.