Create AWS Certificate Manager certificates for 'live' and 'test' subdomains, then put the unique ARN of those certificates in an AWS Systems Manager Parameter Store parameter. Note that the certificates for the static site (live and test subdomains) must be created in us-east-1, because they are used by CloudFront.
-
Create and verify certificates via AWS Certificate Manager Console
-
Store and verify parameters via AWS Systems Manager - Parameter store
or via command line
aws ssm put-parameter --name CertificateArn-live.weijing329.studio --type String --value <arn:aws:acm:...>
aws ssm put-parameter --name CertificateArn-test.weijing329.studio --type String --value <arn:aws:acm:...>
AWS CodeBuild needs access to your GitHub account to display available repositories.
- Create a new CodeBuild project Create build project
- In Source panel, change Source provider to GitHub
- Click Connection to GitHub button
- Click Authorize aws-codesuite button
- To verify, go to Github - Authorized OAuth Apps, check if AWS CodeBuild (N. Virginia) is on the list.
Create a Github Access Token with access to this repo, including "admin:repo_hook" and "repo" permissions. Then store the token in Parameter Store:
- Github Access Token can be created via Github - Personal access tokens
- Store and verify secret parameter via AWS Systems Manager - Parameter store
or via command line
# AWS CloudFormation doesn't currently support the SecureString Systems Manager parameter type.
aws ssm put-parameter --name GitHubToken --type tring --value <GitHubToken>
yarn workspace pipelines deploy:infrastructure
yarn install
yarn pipelines:deploy:infrastructure