{"id":19622269,"url":"https://github.com/commercetools/commercetools-custom-application-aws-starter","last_synced_at":"2026-05-16T19:03:51.387Z","repository":{"id":145046439,"uuid":"347126039","full_name":"commercetools/commercetools-custom-application-aws-starter","owner":"commercetools","description":"Guide to deploying a Custom Application to AWS with Terraform.","archived":false,"fork":false,"pushed_at":"2021-03-16T13:56:58.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-25T14:56:05.948Z","etag":null,"topics":["aws","commercetools","custom-application","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/commercetools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2021-03-12T16:18:44.000Z","updated_at":"2024-05-02T20:53:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f9d1dc7-f908-46aa-898d-559c488f228a","html_url":"https://github.com/commercetools/commercetools-custom-application-aws-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-custom-application-aws-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-custom-application-aws-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-custom-application-aws-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-custom-application-aws-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercetools","download_url":"https://codeload.github.com/commercetools/commercetools-custom-application-aws-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240918764,"owners_count":19878488,"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":["aws","commercetools","custom-application","terraform"],"created_at":"2024-11-11T11:26:56.522Z","updated_at":"2026-05-16T19:03:46.354Z","avatar_url":"https://github.com/commercetools.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://commercetools.com/\"\u003e\n    \u003cimg alt=\"commercetools logo\" src=\"https://unpkg.com/@commercetools-frontend/assets/logos/commercetools_primary-logo_horizontal_RGB.png\"\u003e\n  \u003c/a\u003e\n  \u003cb\u003eMerchant Center Custom Application\u003c/b\u003e\u003cbr /\u003e\n  \u003cb\u003eDeploy to AWS\u003c/b\u003e\n\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\nThis repository assists in deploying a Merchant Center Custom Application to AWS using Terraform.\n\n# High-level Architecture Diagram\n\n![infrastructure](architecture.png)\n\n# Prerequisite\n\nMake sure you have the latest version of the following before deploying. (Or Your CI Platform is ready)\n\n- `node.js`\n- `npm`\n- `yarn`\n- `aws cli` - installed and configured\n- `terraform`\n- `git`\n- `The DNS Domain of Your Site` (With edit rights to DNS Records)\n\nYou should already have a Merchant Center Custom Application built. Follow the getting started guide to install the [starter template](https://docs.commercetools.com/custom-applications/getting-started/installing-a-starter-application). You should have already completed the following steps:\n\n## Adjust the cloud identifier\n\nThe `custom-application-config.json` is configured to use the HTTP APIs in the GCP-EU region. If you plan to run the Custom Application in another environment, change the cloud identifier accordingly.\n\n## Adjust the configuration for production\n\nThe `custom-application-config.json` has a `env.production` configuration object. When you're ready to deploy the application to production, make sure to provide the URL where the Custom Application is hosted.\n\n## Build the production bundles\n\nRun the following command to build the production bundles with webpack:\n\n```bash\n$ yarn build\n```\n\n# Steps to Deploy\n\n## Copy files\n\n- Copy the `terraform` folder from this repository into your application.\n- Copy the `config` folder from this repository into your application.\n\n## Set Terraform Variables\n\n- Edit [`variables.tf`](variables.tf) and edit the necessary variables\n- Edit [`main.tf`](main.tf) and set the region and aws profile\n\n### Verify Route53\n\nIf you don't already have a route53 hosted zone for your domain, create one now. Ensure that the DNS is configured properly.\n\n### Obtain Certificate\n\n1. Login to AWS Console\n2. Select US East (N. Virginia) region (Need to obtain Global Cert for CloudFront)\n3. Request or Import SSL Certificate to your domain, wildcard at that domain level is acceptable\n4. Select Any suitable validation method (DNS or E Mail)\n5. Note down the issued certificate . (It can take few minutes to get it issued)\n\n_\\* Note: This step can be automated using Terraform, but AWS can take up to 30 mins to issue a new cert and validation could take even longer. The delay can create problems for the terraform module deployment._\n\n## Build the Resources\n\n### Build the Custom Application\n\n```bash\n$ yarn build\n$ yarn compile-html\n```\n\n### Generate the Lambda Function\n\nYou can compile manually with the command:\n\n```bash\n$ npx mc-scripts compile-html --transformer  config/transformer-aws.js\n```\n\nOr add it to your package.json for future use:\n\n```json\n  \"scripts\": {\n    \"compile-html:aws\": \"NODE_ENV=production dotenv -- mc-scripts compile-html --transformer  $(pwd)/config/transformer-aws.js\",\n  }\n```\n\n```bash\n$ yarn compile-html:aws\n```\n\n## Deploy the Infrastructure\n\n```bash\n$ cd terraform\n$ terraform init\n$ terraform validate\n$ terraform plan\n$ terraform apply\n```\n\n## Copy the complied application to the newly created bucket.\n\n```\naws s3 cp --recursive --acl public-read public/ s3://\u003cspa-app-bucket-name\u003e/\n```\n\n_\\* Tip: [`aws s3 sync`](https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html) can be used for updating the application_\n\n## Register\n\nRegister the custom application within the Merchant Center.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-custom-application-aws-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercetools%2Fcommercetools-custom-application-aws-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-custom-application-aws-starter/lists"}