{"id":23362855,"url":"https://github.com/remotesynth/aws-for-frontend-devs","last_synced_at":"2025-04-10T12:06:29.080Z","repository":{"id":246962051,"uuid":"823666378","full_name":"remotesynth/aws-for-frontend-devs","owner":"remotesynth","description":"A series of examples exploring the AWS primitives needed to deploy a web application to AWS.","archived":false,"fork":false,"pushed_at":"2024-09-23T12:15:20.000Z","size":116,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T10:56:26.600Z","etag":null,"topics":["api-gateway","aws","aws-lambda","cloudfront","dynamodb","lambda","localstack","s3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remotesynth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-03T13:23:00.000Z","updated_at":"2024-11-26T17:20:21.000Z","dependencies_parsed_at":"2024-08-09T03:33:15.426Z","dependency_job_id":null,"html_url":"https://github.com/remotesynth/aws-for-frontend-devs","commit_stats":null,"previous_names":["remotesynth/aws-for-frontend-devs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Faws-for-frontend-devs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Faws-for-frontend-devs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Faws-for-frontend-devs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotesynth%2Faws-for-frontend-devs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remotesynth","download_url":"https://codeload.github.com/remotesynth/aws-for-frontend-devs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217003,"owners_count":21066633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","aws","aws-lambda","cloudfront","dynamodb","lambda","localstack","s3"],"created_at":"2024-12-21T12:33:13.170Z","updated_at":"2025-04-10T12:06:29.060Z","avatar_url":"https://github.com/remotesynth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Intro to AWS for Front-end Developers\n\nThis repository contains a series of examples that support an (upcoming) article introducing core AWS primitives that are used in web development for web developers. The example goes from the very basics for hosting a static site to implementing a serverless backend with data.\n\nThe demos build upon one another, so, if you'd like to follow along, you can try them via the subfolders in this order:\n\n1. *s3* – This is just setting up a basic S3 bucket for web hosting static assets.\n2. *cf-s3* – This adds a Cloudfront distribution in front of the S3 bucket to implement edge caching of static assets.\n3. *lambda* – This adds a simple Lambda with function URL to handle backend calls for the site.\n4. *api-gateway* – This assumes you'll have a larger backend than a single function that you'd like to put behind an API Gateway with logical endpoints.\n5. *dynamodb* – This adds a data backend stored in DynamoDB that provides data through the Lambda to the site.\n\nThe *site_assets* folder contains an extremely simple web site example that is built through these steps. It attempts to load details about the API through a `config.json` file that gets written during deployment. If the API is available it will show the results of calling the lambda function on the page.\n\n## Running the Examples\n\nEach of the examples are built using the [AWS CDK](https://aws.amazon.com/cdk/) to generate the necessary AWS infrastructure and services required to run the example. The examples are designed to be tested locally using [LocalStack](https://localstack.cloud) or deployed remotely to AWS.\n\n### Deploying Locally to LocalStack\n\n_Please note that a LocalStack Pro account is required to run these examples due to features used in the CDK deployment to push local assets to S3 and Lambda. Be sure that you have enabled your [auth token](https://docs.localstack.cloud/getting-started/auth-token/) to access the Pro features._\n\nOnce you have [LocalStack installed](https://docs.localstack.cloud/getting-started/installation/) and have Docker running, you can use the LocalStack CLI to build and deploy each of the examples. You will need the [AWS CDK CLI for LocalStack](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/#aws-cdk-cli-for-localstack) installed as well.\n\nTo install all of the prerequisites, you can use the Makefile:\n\n```bash\nmake install\n```\n\nOnce the prerequisites are installed, you can follow the same basics steps to deploy each example.\n\nStart LocalStack from the terminal:\n\n```bash\nlocalstack start\n```\n\nNext, bootstrap the deployment. For example, to bootstrap the initial S3 example:\n\n```bash\ncd s3\ncdklocal bootstrap\n```\n\nOnce the bootstrapping has completed, you can then run the deploy:\n\n```bash\ncdklocal deploy\n```\n\nAfter the deploy is completed, you will see some outputs in the terminal. For example for the S3 example, it will output the S3 URL that you can open in your browser to view the static web page.\n\n* If you get an error during the bootstrap, this can commonly be caused by either LocalStack or Docker not running. Be sure that you are successfully started LocalStack and Docker before bootstrapping.\n* If your deployment fails to load the assets required to run the site (i.e. into S3 and Lambda), be sure that you have successfully added your auth token. When you start up LocalStack in the terminal, you should see a message reading something like `Successfully activated cached license`.\n\n### Deploying Remotely to AWS\n\nYou will need to have the [AWS CLI](https://github.com/aws/aws-cli/tree/v2?tab=readme-ov-file#installation) installed and configured for your account (you will likely need to set up an IAM user and obtain an access key). Finally, you will need to install the [AWS CDK CLI](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_install).\n\nOnce these prerequisites are installed, you can bootstrap the deployment. For example, to bootstrap the initial S3 example:\n\n```bash\ncd s3\ncdk bootstrap\n```\n\nOnce the bootstrapping has completed, you can then run the deploy:\n\n```bash\ncdk deploy\n```\n\nAfter the deploy is completed, you will see some outputs in the terminal. For example for the S3 example, it will output the S3 URL that you can open in your browser to view the static web page deployed to AWS.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremotesynth%2Faws-for-frontend-devs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremotesynth%2Faws-for-frontend-devs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremotesynth%2Faws-for-frontend-devs/lists"}