Skip to content

petafox/petafox.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website of Petafox

https://www.petafox.com

Deploy

bin/deploy uploads the static website files to S3 and invalidates the whole CloudFront distribution.

brew install awscli

AWS credentials in ~/.aws/credentials:

[petafox.com]
aws_access_key_id = MY_ACCESS_KEY_ID
aws_secret_access_key = MY_SECRET_ACCESS_KEY

Create ~/.aws/config:

[profile petafox.com]
region = eu-north-1
output = json

Deploy [using an optional AWS profile name]:

./bin/deploy [aws_profile_name]

IAM user for deploy

Create a dedicated IAM user for this deploy script, for example petafox-com-deploy.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DeployWebsiteBucketObjects",
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::www.petafox.com/*"
    },
    {
      "Sid": "ListWebsiteBucket",
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket",
        "s3:GetBucketLocation"
      ],
      "Resource": "arn:aws:s3:::www.petafox.com"
    },
    {
      "Sid": "InvalidateWebsiteDistribution",
      "Effect": "Allow",
      "Action": "cloudfront:CreateInvalidation",
      "Resource": "arn:aws:cloudfront::AWS_ACCOUNT_ID:distribution/CLOUDFRONT_DISTRIBUTION_ID"
    }
  ]
}

About

Website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors