{"id":21700158,"url":"https://github.com/wp-digital/aws-lambda-critical-css","last_synced_at":"2025-09-11T01:08:14.391Z","repository":{"id":37032034,"uuid":"101928263","full_name":"wp-digital/aws-lambda-critical-css","owner":"wp-digital","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-04T02:29:33.000Z","size":59306,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T13:57:45.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/wp-digital.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}},"created_at":"2017-08-30T20:59:14.000Z","updated_at":"2024-05-26T00:23:21.000Z","dependencies_parsed_at":"2023-07-15T12:23:50.217Z","dependency_job_id":null,"html_url":"https://github.com/wp-digital/aws-lambda-critical-css","commit_stats":null,"previous_names":["innocode-digital/aws-lambda-critical-css"],"tags_count":2,"template":true,"template_full_name":null,"purl":"pkg:github/wp-digital/aws-lambda-critical-css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Faws-lambda-critical-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Faws-lambda-critical-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Faws-lambda-critical-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Faws-lambda-critical-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-digital","download_url":"https://codeload.github.com/wp-digital/aws-lambda-critical-css/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Faws-lambda-critical-css/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274557583,"owners_count":25307516,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-25T20:13:05.906Z","updated_at":"2025-09-11T01:08:14.331Z","avatar_url":"https://github.com/wp-digital.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Lambda Critical CSS\n\n### Description\n\nAWS Lambda function for generating critical stylesheets.\n\n### WordPress\n\nInitially this function was created to be used with WordPress via plugin [AWS Lambda Critical CSS](https://github.com/innocode-digital/wp-critical-css-aws-lambda), \nso you just need to install plugin.\n\n### Basic usage (non WordPress)\n\nEvent JSON:\n\n| **Name** | **Type** | **Description** |\n|----------|----------|-----------------|\n| key | `string` | Identifier, it could be a template name. |\n| styles | `array`  | List of original CSS files. |\n| url | `string` | URL for grabbing critical CSS. |\n| hash | `string` | Version hash. |\n| return_url | `string` | Endpoint where result should be returned. |\n| secret | `string` | Secret to be added to POST callback request. |\n\n#### Notes\n\n- Hash is something how you can determine that callback is still actual. There is MD5 hash of concatenated string of\n  stylesheet names with file version is used in WordPress plugin.\n- Secret is for authorization. In WordPress plugin this secret has 20 minutes live time\n  ([15 minutes](https://aws.amazon.com/ru/about-aws/whats-new/2018/10/aws-lambda-supports-functions-that-can-run-up-to-15-minutes/#:~:text=You%20can%20now%20configure%20your,Lambda%20function%20was%205%20minutes.)\n  is a maximum execution time of AWS Lambda function and plus 5 minutes of reserve).\n\nExample: \n  \n````\n{\n  \"key\": \"single\",\n  \"styles\": [\n    \"https://site.com/css/bootstrap.min.css\",\n    \"https://site.com/css/screen.min.css?ver=1.0.0\"\n  ],\n  \"url\": \"https://www.site.com/blog/hello-world/\",\n  \"hash\": \"a05d2d03525b97379c42ef1525a4a6b9\",\n  \"return_url\": \"https://site.com/api/v1/stylesheet\",\n  \"secret\": \"aQ3qnPPnDwhaB7pzI3Y0jQx*\"\n}\n````\n\n### Installation\n\n- **Use this template** from Github.\n- [Create AWS Access Keys](https://www.serverless.com/framework/docs/providers/aws/guide/credentials#creating-aws-access-keys).\n  You can follow [this gist](https://gist.github.com/ServerlessBot/7618156b8671840a539f405dea2704c8) to create policy.\n- Add **API Key** \u0026 **Secret** with **Region** to Github **Repository secrets** into `AWS_ACCESS_KEY_ID`,\n  `AWS_SECRET_ACCESS_KEY` and `AWS_REGION` variables.\n- Deploy function with Github Actions. `dev` branch will be deployed on push into **critical-css-dev-processor** function,\n  production should be deployed manually through `workflow_dispatch` into **critical-css-production-processor**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-digital%2Faws-lambda-critical-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-digital%2Faws-lambda-critical-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-digital%2Faws-lambda-critical-css/lists"}