Catalog npm
Back to packageRELEASE DETAILS

1.0.3

npm

@0x4447/strawberry

🍓This CLI will create a SSL domain redirection using CloudFront and S3 automatically for you.

0x4447awsclicloudfrontnodejsredirects3ssl
Published1 Jul 2018
Direct dependencies4
Transitive dependenciesNot calculated

README

Current package documentation

🍓 Strawberry

This CLI was create out of frustration after we struggled countless times to do a simple HTTPS redirect, for example from: https://example.com to https://www.example.com.

This is a straightforward action over a non-encrypted connection. However, trying to make it work over HTTPS is an entirely different story, since you need a server with a certificate that can establish a secure connection before the server can tells the browser where to go.

It's simple to do this with a regular server, but more complicated if working with serverless technologies, not to mention the certificate setup and management for such a simple task.

That's how Strawberry came to be. We actually use serverless technology to fight serverless technologies through the use of AWS S3 and AWS CloudFormation to handle this simple operation. Go figure...

Strawberry automatically creates the entire stack for you. All you have to do is provide some basic information, and leave the rest up to the CLI.

How to install

] sudo npm install -g @0x4447/strawberry

How to use

] strawberry -s source.example.com -d destination.example.com

Where to get help

] strawberry -h

What to expect

This CLI...

  • Creates an S3 bucket with redirect enabled to the destination domain
  • Creates a certificate for the source domain
  • Creates a CloudFront distribution with the new certificate
  • Configures Route 53 so the source domain points to CloudFront

WARNING: What if the certificate takes too long to validate? After 60 seconds, the app quits and prints out a detailed explanation of what your next steps should be. Take the time to thoroughly go over the printout, and you'll be good.

High-level flow looks like this:

  • User visit the source domain
  • A secure connection is established
  • CloudFront reads the S3 bucket configuration
  • The user is redirected to the destination domain

All of this is done through the use of SSL.

Credentials

To use this CLI, create a programmatic user or create a role with the following permissions:

  • AmazonS3FullAccess
  • CloudFrontFullAccess
  • AmazonRoute53FullAccess
  • AWSCertificateManagerFullAccess

Is deployment instant?

No, it's not. The following aspects don't happen right away:

  • SSL Certificate confirmation
  • CloudFront distribution

SSL Certificate confirmation

The timeframe for this process ranges from 10 seconds to 24 hours. It's completely unpredictable, and there's no way to speed up the process. Because of this, the app quits if the certificate isn't confirmed within 60 seconds. When that happens, go to the AWS Console to monitor the certificate.

CloudFront distribution

This takes up to 15 or 20 minutes, but when you reach this point, you can be certain that the configuration is correct. At this point, you just need to wait until the process is complete. Only then will the domain deliver the website.

The end

If you enjoyed this project, please consider giving it a 🌟. And check out our 0x4447 GitHub account, which contains additional resources you might find useful or interesting.

Sponsor 🎊

This project is brought to you by 0x4447 LLC, a software company specializing in building custom solutions on top of AWS. Follow this link to learn more: https://0x4447.com. Alternatively, send an email to hello@0x4447.email.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aws-sdk
Environment
{
  "local_name": "aws-sdk",
  "alias": false,
  "peer_metadata": null
}
2.264.1runtime
commander
Environment
{
  "local_name": "commander",
  "alias": false,
  "peer_metadata": null
}
2.15.1runtime
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
5.2.0runtime
terminal-kit
Environment
{
  "local_name": "terminal-kit",
  "alias": false,
  "peer_metadata": null
}
1.17.11runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-j0oHeq0SEQ6Wgt1bsvGqL89DEZS8PF/y2osIRjfeiliJcibi3qEfDliAbr1IO3U7Rjdtcxj53ItsH2Ne+8tB9w==",
  "shasum": "ade40854d3f6a9639c2ae75b51f4232d18a34046",
  "tarball": "https://registry.npmjs.org/@0x4447/strawberry/-/strawberry-1.0.3.tgz",
  "fileCount": 6,
  "unpackedSize": 42744,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbOMHHCRA9TVsSAnZWagAAAN8P/0chQFKvGl3jO5r6eoDV\n6cb01+neexeO0y4OyROkH7rZ60piOV9jSYo02HI94DeoPkCUg4u5iqk8tK/1\n3/54EL1ENqTBw3Kwkn8rcA8rnMG0MP+9D0gwWq7sz4LSqy0hfmC6cKBc1nJW\nZL7GlGmhmbI2bo5mHaWtBPzUdH5qVrY6GOO9K4nZgphYwThFgce886ZaqLVY\nY1cJaIOzheusd21u2gHVeyAnxzHTypfZrFz5p4OGocD7ALvxGCoDMvG5HXfn\naebLCI4jdzvxdC1GGlM4Zd67Qh7NvlC0YD7aRkPhShu3F7sHITBSSniLTBAw\nZosRC8Y1ysxVydD8mcFY1vpk2/QQoCnDzUsiOSCHO7rRgJZIiUXuRBSDJamw\n++XhBiOb69Slfi1lX0euKFMtXGrKLpbobFs1OFrZcyeRaoWcChdE4gZ+PmbB\nWO8fEZG3k9/ZXObeysNRGWN6SuJAZBbjmwXXI5fnCoebdGQqNl7ygToWS+hR\n8XM31Cpqi8Hl5Ame6vbVzlUQUjsapEi18IrAamaAT8whpY1xvXcIg/cW6B/2\nU94XbvzjdJYBu9lgaACyLLHqU9a5S4Dq5P9RPK1Tr2/WY2OJTaF/fxZ2cSmc\nEReHXTKn/15G/9XHU5px3TGCgKtsUd1KvBxKAqfYsYEwlGNPtB0NCf+G6Kzi\nZ5s8\r\n=9W+R\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIBuZS5/3rLezp5bDWTdECB0KfSR4bXMHBofCue0VqJG8AiBzX3YGEvaqY4+2l7/cEB7B1TZmQiRu8oi5nb+VpNkp9w=="
    }
  ]
}

Repository

PENDING
0x4447/0x4447-cli-strawberry

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0x4447/0x4447-cli-node-strawberry

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:adeb8a2111d7f8bfeaf25a717435d88436acb51a1f76aee43864cfd7b0d894eb

Other collected versions

1.0.48 Feb1.0.21 Jul1.0.130 Jun1.0.030 JunView all collected versions →