Skip to content

paulaguijarro/pulumi-s3-static-webpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulumi S3 static-webpage

Host a static website on AWS S3 with Pulumi and Golang

How to use it

Requirements

  • Install Pulumi: brew install pulumi/tap/pulumi
  • Install Go
  • Install AWS CLI and configure it to access your account

Configuration

  • Create a new stack: pulumi stack init <stack-name>
  • Configure the stack: pulumi config set aws:region <aws-region>

Deployment

Deploy the stack: pulumi up

$ pulumi up
Previewing update (<stack-name>)

     Type                    Name                           Plan       
 +   pulumi:pulumi:Stack     pulumi-s3-static-webpage-dev   create     
 +   ├─ aws:s3:Bucket        website-bucket                 create     
 +   └─ aws:s3:BucketObject  index.html                     create     
 
Outputs:
    bucketEndpoint: output<string>
    bucketName    : output<string>

Resources:
    + 3 to create

Do you want to perform this update? yes
Updating (<stack-name>)

     Type                    Name                           Status      
 +   pulumi:pulumi:Stack     pulumi-s3-static-webpage-dev   created     
 +   ├─ aws:s3:Bucket        website-bucket                 created     
 +   └─ aws:s3:BucketObject  index.html                     created     
 
Outputs:
    bucketEndpoint: "http://website-bucket-f7900c5.s3-website-eu-west-1.amazonaws.com"
    bucketName    : "website-bucket-f7900c5"

Resources:
    + 3 created

Duration: 7s

Check out your static website at the URL in the outputs

curl $(pulumi stack output bucketEndpoint)

Remove reources

Destroy the stack: pulumi destroy Delete the stack itself: pulumi stack rm

About

Host a static website on AWS S3 with Pulumi and Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published