Create an AWS CLI script to automate static site creation

Completado Publicado hace 5 años Pagado a la entrega
Completado Pagado a la entrega

[Instructions attached as well for easier reading]

I want a bash shell script that automates the following:

[Note: unless specified, configuration values are the default ones as seen when creating it via the Web Admin]

1) Asks for the AWS Key

2.1) Asks for a domain name (i.e. my-domain.com. From now on "[login to view URL]" is used to refer to the domain entered in this step)

2.2) Asks (and validates it exists) for the path to an html file to be uploaded to S3 later on. Also verifies the file name is called [login to view URL]

3) Route53: Creates a Hosted Zone with such domain name

4) ACM (certificate Manager): requests a public certificate to be created with name [login to view URL] and "another domain" with *.[login to view URL]

5) ACM: Validates the domain via DNS record, Automatically generating it in Route53

6) S3: Creates a bucket called [login to view URL], makes it public and sets Properties -> Static Web Content -> Redirect everything to [login to view URL]

7) S3: Creates a bucket called [login to view URL],

7.1) makes it private,

7.2) uploads [login to view URL] file to it,

7.3) Sets "monitor at additional cost" to true

7.4) and sets Properties -> Static Web Hosting -> Use this bucket to host a static website. Set default html to [login to view URL] and error html to [login to view URL]

8) Cloudfront: Creates a distribution....

8.1) The Origin Domain Name must be the S3 bucket created in step (7) ([login to view URL])

8.2) Origin Path, empty

8.3) Origin ID "s3-[[login to view URL]]"

8.4) Restrict Bucket Access to true

8.5) Creates a new Identity called "access-identity-[[login to view URL]].[login to view URL]"

8.6) Updates Bucket policy to allow this new identity to access it (and nobody else, except the owner)

8.7) Sets compress Objects automatically to true

8.8) Alternate Domain Names to [login to view URL] (first) and the [login to view URL]

8.9) Sets a custom SSL ceritificate, to the one created in Step (4)

8.10) Sets Default Root Object to [login to view URL]

9) Route53: edit the created Hosted Zone:

9.1) Create an A record, ALIAS, for [[login to view URL]] pointing to the S3 bucket [login to view URL] (no www)

9.2) Create en A record, ALIAS, for [www][[login to view URL]] pointing to the Distribution created in step 8

DONE!

Additional considerations:

* Default values are the one seen when using the web version of the admin, creating each step manually. Don't know the default values of the CLI API

* I know it make take time for the Ceritifcate Manager to validate the certificate via DNS. Ideally we can create the distribution with such certificate anyways, and whenever it is ready it starts working. If not I need suggestions for a workaround

* The script will log to output console everything it is doing just in case it is stopped somewhere in between steps.

Amazon Web Services Shell Script

Nº del proyecto: #18110039

Sobre el proyecto

5 propuestas Proyecto remoto Activo hace 5 años

Adjudicado a:

ninjagp

I am an AWS scripting expert . Currently I am working in htp://[login to view URL] and I am in charge of cloud platform. I have writen the generatesite script in my company, and I am really confortable automating the Más

$130 USD en 4 días
(1 comentario)
2.2

5 freelancers están ofertando un promedio de $172 por este trabajo

schoudhary1553

Hello, Hope you are doing well. I can help with you in your project Create an AWS CLI script to automate static site creation. I can assure you the quality job. I have good experience in Amazon Web Services, S Más

$250 USD en 4 días
(10 comentarios)
4.8
squishyhippie

HI There, I'm a DevOps Engineer with plenty of AWS experience. I'd be more than happy to help you accomplish this task. Please let me know if you have any questions. Regards, Adam

$155 USD en 3 días
(1 comentario)
1.6
dddbnelson

Hi There, This would be done using a cloudformation template to automate the launch process. I'm an experienced Solution Architect. I have worked with AWS as a consultant for over 2 years. I will be happy workin Más

$238 USD en 3 días
(0 comentarios)
0.0
jackaback

I am very familiar with aws setup and have done similar things as you required for your case, we can automate all the infra related setup it should be pretty fast and easy

$88 USD en 1 día
(0 comentarios)
0.0