Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
コーポレートサイトを静的化してAmplify Consoleにデプロイする
cockscomb
November 27, 2020
Programming
0
1.6k
コーポレートサイトを静的化してAmplify Consoleにデプロイする
AWS Amplify Meet-up #2
で発表しました。
cockscomb
November 27, 2020
Tweet
Share
More Decks by cockscomb
See All by cockscomb
cockscomb
5
1.1k
cockscomb
10
9k
cockscomb
2
6.4k
cockscomb
1
6.1k
cockscomb
7
1.5k
cockscomb
5
6.6k
cockscomb
0
2.4k
cockscomb
0
590
cockscomb
0
2.1k
Other Decks in Programming
See All in Programming
grapecity_dev
0
190
mackee
0
590
numeroanddev
1
240
takapy
0
120
grapecity_dev
0
180
makicamel
0
180
yoshinoriiiii
0
110
watilde
5
1.4k
dbrumann
0
110
manfredsteyer
PRO
0
140
oracle4engineer
0
110
konstantin_diener
0
130
Featured
See All Featured
myddelton
109
11k
bkeepers
52
4.2k
kneath
219
15k
notwaldorf
16
1.8k
ufuk
56
5.4k
brianwarren
82
4.7k
jcasabona
8
550
malarkey
392
61k
jnunemaker
PRO
40
4.6k
mongodb
23
3.9k
schacon
145
6.6k
roundedbygravity
84
7.9k
Transcript
Amplify Console Amplify Meetup #2
None
None
IR
None
None
None
Next.js React Server-side Rendering Webpack etc.
Next.js Server-side Rendering Incremental Static Regeneration Static Generation
Server-side Rendering Incremental Static Regeneration Static Generation Build Request Request
Request = Rendering
/pages/index.tsx / /pages/information.tsx /information /pages/information/outline.tsx /information/outline /public/ir/news.html /ir/news
$ next export
None
CI/CD
AWS Amplify Console
Pull Request BASIC
CI/CD
CI/CD amplify.yml YAML Amplify Console Amplify version: 1.0 backend: phases:
preBuild: commands: - yarn build: commands: - amplifyPush - - simple frontend: phases: preBuild: commands: - yarn build: commands: - yarn workspace hatenacorp build - yarn workspace hatenacorp export artifacts: baseDirectory: ./packages/hatenacorp/out files: - '** / * ' cache: paths: - 'node_modules / * * / * '
[ { "source": "/images", "target": "https: / / images.otherdomain.com", "status":
"200", "condition": null }, { "source": "/ < * > ", "target": "/404.html", "status": "404-200", "condition": null } ]
None
AWS CDK Infrastructure as Code AWS CloudFormation TypeScript
import * as cdk from '@aws-cdk/core' import * as amplify
from '@aws-cdk/aws-amplify' export class AmplifyStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props ? : cdk.StackProps) { super(scope, id, props) const amplifyApp = new amplify.App(this, 'hatenacorp', { sourceCodeProvider: new amplify.GitHubSourceCodeProvider({ owner: 'hatena', repository: 'hatenacorp', oauthToken: cdk.SecretValue.secretsManager('hatenacorp-github-oauth-token'), }), autoBranchCreation: { patterns: ['staging'], }, }) } }
None
Amplify AWS AWS
Amplify GraphQL AWS AppSync DynamoDB Lambda S3
Next.js Amplify Console CDK