-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Static Web Application Distribution #74
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,10 +7,13 @@ help: ## Show this help message | |||||||||||
|
||||||||||||
test-deploy: ## Deploy CloudFormation Template to localstack | ||||||||||||
@echo "Deploying S3 and CloudFront Template" | ||||||||||||
aws cloudformation create-stack --endpoint-url "http://localhost:4566" --stack-name "static-web-site-distribution" \ | ||||||||||||
aws cloudformation create-stack --endpoint-url "http://localhost:4566" --stack-name "static-web-site-distribution" --region ap-northeast-1 \ | ||||||||||||
--template-body "file://template.yml" --parameters "file://parameters.json" --capabilities CAPABILITY_NAMED_IAM | ||||||||||||
|
||||||||||||
deploy: ## Deploy CloudFormation Template | ||||||||||||
@echo "Deploying S3 and CloudFront Template" | ||||||||||||
aws cloudformation create-stack --stack-name "static-web-site-distribution" \ | ||||||||||||
--template-body "file://template.yml" --parameters "file://parameters.json" --capabilities CAPABILITY_NAMED_IAM | ||||||||||||
aws cloudformation create-stack --stack-name "static-web-site-distribution" --region ap-northeast-1 \ | ||||||||||||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same refinement suggestion applies here for the - aws cloudformation create-stack --stack-name "static-web-site-distribution" --region ap-northeast-1 \
+ AWS_REGION ?= ap-northeast-1
+ aws cloudformation create-stack --stack-name "static-web-site-distribution" --region $(AWS_REGION) \ Committable suggestion
Suggested change
|
||||||||||||
--template-body "file://template.yml" --parameters "file://parameters.json" --capabilities CAPABILITY_NAMED_IAM | ||||||||||||
|
||||||||||||
upload: ## Upload index.html | ||||||||||||
Comment on lines
+18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The - aws s3 cp ./index.html s3://content-bucket-rainbow-spa
+ BUCKET_NAME ?= content-bucket-rainbow-spa
+ aws s3 cp ./index.html s3://$(BUCKET_NAME) Committable suggestion
Suggested change
|
||||||||||||
aws s3 cp ./index.html s3://content-bucket-rainbow-spa |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Simple Page</title> | ||
</head> | ||
<body> | ||
<h1>Hello, World!</h1> | ||
<p>This is a simple HTML page.</p> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"ParameterKey" : "ContentBucketName", | ||
"ParameterValue" : "ContentBucketNameRainbow" | ||
"ParameterValue" : "content-bucket-rainbow-spa" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of
--region ap-northeast-1
parameter ensures that the deployment is targeted to the specified AWS region. This is a good practice for clarity and control over deployment locations. However, consider making the region a variable to enhance flexibility and reusability of the Makefile across different AWS regions.Committable suggestion