Cosmic JS Blog Stay tuned for feature roll-outs, community news, and updates from the Cosmic JS team.

Introducing Cosmic Functions


We're excited to release Cosmic Functions (public beta) to help teams build amazing modern products together with new serverless solutions.

Click here to go directly to the Cosmic Functions documentation >>


What are serverless functions?
Serverless function development is rapidly growing in popularity. And it's no surprise. With serverless, you don't have to manage server infrastructure, you get infinite scalability, and you never have to pay for idle server time like with AWS EC2, Digital Ocean Droplets, etc. You only pay for code executions. 

We even wrote an article about the advantages of serverless development and offer a Serverless Starter App for teams that want to get familiar with this new technology.

Along with our best-in-class headless CMS and application development tools, adding serverless solutions helps further our mission to help teams build modern apps faster.  We think that you'll find Cosmic Functions to be the most delightful way to deploy serverless functions, right from the comfort of your Cosmic JS Bucket.

Find Cosmic Functions in Your Bucket > Settings > Functions


What are Cosmic Functions?
Cosmic Functions allow you to deploy AWS Lambda functions (currently Node.js v8.10) without having to manage server infrastructure.  You can deploy your functions to AWS through your Bucket Dashboard located at Your Bucket > Settings > Functions

AWS Lambda functions are infinitely scalable, highly cost effective, and you get 1M requests per month free.  Using Cosmic to deploy your functions is 100% free.  Cosmic JS does not charge you to deploy your AWS Lambda functions.  All analytics and billing is connected to your AWS account.

What's required?
1. Your AWS access key and secret key
2. Node.js codebase (zip or link to git repo) that follows Lambda requirements. (If you've linked your Cosmic JS account to your GitHub account, you can deploy private GitHub repos as well as public repos).


Getting Started
To get started deploying your own Functions go to Your Bucket > Settings > Functions.  For more information, go to the Cosmic Functions documentation.


It's our hope that Cosmic Functions help you deploy code fast and efficiently, helping your team build great products. We're excited to see what you build and please let use know if you have any questions or would like to schedule a demo.

You can also reach out to us on Twitter and join the conversation on Slack.

You may also like


We're excited to ship an enhancement to Media Management within Cosmic JS. Now when you Add Media from your Media Folder to the Content Editor or an Image Metafield, you'll be able to search by media name, metadata, as well as filter among media folders. 

We're always striving to make the job of the developer and content editor faster and easier.  Now you can add thumbnails to your Buckets.

Cosmic JS is great for hosting content for an entire website or application, but can also be used to add quick, dynamic content elements to any existing website.  In this short tutorial, I'll show you how you can add a news feed widget to your website in a few short steps.  Let's get to it:

1. Sign in to your Cosmic JS account.

2. After signing in, select "Add object type" in the left side nav of your bucket's dashboard and create a "News" object type.  Call the object type "News" (plural) and "Article" (singular).  Then add your articles (you can add content or metafields later, they're not required for this example).


3. In your HTML file add a div that will receive the news feed then add the Cosmic JS browser client to get your bucket's content.  You can download the Cosmic JS Browser Client on GitHub.  Next, in only a few lines of code, you can get the articles from your bucket.  Here is a quick JS Fiddle of everything you will need:

You can see how powerful this is.  A developer can add these dynamic areas to any portion of an existing site and enjoy the benefits of a CMS API.  Any non-dev team member can be invited to edit this content in the Cosmic JS admin dashboard quickly and easily with no database or server-side installation necessary!


As 2017 comes to a close and we look forward to a new year, I wanted to share my gratitude and excitement for what we've accomplished at Cosmic JS over the past year and what's to come in 2018.

In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Owen Liversidge, a Web Developer residing in Atlanta, Georgia who's currently helping lead the development charge at renowned game development company Tripwire Interactive. Owen just built Tripwire's new corporate website on a React and Cosmic stack. Follow Owen on LinkedIn or GitHub, and enjoy the Q/A.

Download receipts for your Cosmic JS Buckets within your Dashboard.