Sapper switched to rollup and amplify configuration
This commit is contained in:
8
amplify/backend/backend-config.json
Normal file
8
amplify/backend/backend-config.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"hosting": {
|
||||
"S3AndCloudFront": {
|
||||
"service": "S3AndCloudFront",
|
||||
"providerPlugin": "awscloudformation"
|
||||
}
|
||||
}
|
||||
}
|
3
amplify/backend/hosting/S3AndCloudFront/parameters.json
Normal file
3
amplify/backend/hosting/S3AndCloudFront/parameters.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"bucketName": "michalvankodev-20190712100852-hostingbucket"
|
||||
}
|
113
amplify/backend/hosting/S3AndCloudFront/template.json
Normal file
113
amplify/backend/hosting/S3AndCloudFront/template.json
Normal file
@ -0,0 +1,113 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
"Description": "Hosting resource stack creation using Amplify CLI",
|
||||
"Parameters": {
|
||||
"env": {
|
||||
"Type": "String"
|
||||
},
|
||||
"bucketName": {
|
||||
"Type": "String"
|
||||
}
|
||||
},
|
||||
"Conditions": {
|
||||
"ShouldNotCreateEnvResources": {
|
||||
"Fn::Equals": [
|
||||
{
|
||||
"Ref": "env"
|
||||
},
|
||||
"NONE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Resources": {
|
||||
"S3Bucket": {
|
||||
"Type": "AWS::S3::Bucket",
|
||||
"DeletionPolicy": "Retain",
|
||||
"Properties": {
|
||||
"BucketName": {
|
||||
"Fn::If": [
|
||||
"ShouldNotCreateEnvResources",
|
||||
{
|
||||
"Ref": "bucketName"
|
||||
},
|
||||
{
|
||||
"Fn::Join": [
|
||||
"",
|
||||
[
|
||||
{
|
||||
"Ref": "bucketName"
|
||||
},
|
||||
"-",
|
||||
{
|
||||
"Ref": "env"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"AccessControl": "Private",
|
||||
"WebsiteConfiguration": {
|
||||
"IndexDocument": "index.html",
|
||||
"ErrorDocument": "index.html"
|
||||
},
|
||||
"CorsConfiguration": {
|
||||
"CorsRules": [
|
||||
{
|
||||
"AllowedHeaders": [
|
||||
"Authorization",
|
||||
"Content-Length"
|
||||
],
|
||||
"AllowedMethods": [
|
||||
"GET"
|
||||
],
|
||||
"AllowedOrigins": [
|
||||
"*"
|
||||
],
|
||||
"MaxAge": 3000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Outputs": {
|
||||
"Region": {
|
||||
"Value": {
|
||||
"Ref": "AWS::Region"
|
||||
}
|
||||
},
|
||||
"HostingBucketName": {
|
||||
"Description": "Hosting bucket name",
|
||||
"Value": {
|
||||
"Ref": "S3Bucket"
|
||||
}
|
||||
},
|
||||
"WebsiteURL": {
|
||||
"Value": {
|
||||
"Fn::GetAtt": [
|
||||
"S3Bucket",
|
||||
"WebsiteURL"
|
||||
]
|
||||
},
|
||||
"Description": "URL for website hosted on S3"
|
||||
},
|
||||
"S3BucketSecureURL": {
|
||||
"Value": {
|
||||
"Fn::Join": [
|
||||
"",
|
||||
[
|
||||
"https://",
|
||||
{
|
||||
"Fn::GetAtt": [
|
||||
"S3Bucket",
|
||||
"DomainName"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Description": "Name of S3 bucket to hold website content"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user