Image for post
Image for post

This post assumes you are familiar with AWS and the Serverless Framework.

This will show only the relevant configuration settings for deploying a new SQS Queue using Serverless. At the bottom, you can find a link to how to send an SQS message with Node.

Expected Outcome

I am only showing the relevant parts of the serverless yaml here. Your file will have other configurations for sure. …


Image for post
Image for post

This post assumes you are familiar with Node and AWS.

All of the searches for the specific code to send an SQS message were either wonky or out of date. So here’s what you need, short and sweet.

import AWS from 'aws-sdk'
AWS.config.update({region: 'us-east-1'})
const SQS = new AWS.SQS({apiVersion: '2012-11-05'})


const sendSQS = (params1, param2) => {
const params = {
MessageBody: JSON.stringify({ param1, param2 }),
QueueUrl: <QUEUE_URL>,
MessageAttributes: {
SomeAttr: {
DataType: 'String',
StringValue: 'cool beans'
},
OtherAttr: {
DataType: 'String',
StringValue: 'hey there good lookin'
}
}
}

SQS.sendMessage(params, (err,result) => {
if (err) {
console.log(err)
return
}
console.log(result)
})
}

You can leave MessageAttributes out altogether. But if you want them, the format above is not optional. You must specify the DataType and StringValue for each property. …


Image for post
Image for post

This post assumes you have working knowledge of AWS Lambda and Serverless.

Assumptions

Once you have those three things we can proceed.

First, install the Serverless plugin serverless-domain-manager.

yarn add -D serverless-domain-manager
npm install --save-dev serverless-domain-manager

Navigate to your serverless.yml file and add the following:

plugins:
- serverless-domain-manager
custom:
customDomain:
domainName: <choose a subdomain>.<your custom domain>.com
basePath: ""
certificateName: "*.<your custom domain>.com"
createRoute53Record: true

For a wildcard SSL certificate you must have a subdomain. So where it says <choose a subdomain> pick something. It can be anything alphanumeric, but it can’t be blank. For example yoyo.google.com will work but google.com


Image for post
Image for post

This post assumes you have a Slack App set up and a basic working knowledge of Slack and Node.

Our goal here is to get a direct message from our bot to a user. This message should appear in the bots direct message channel and not in the Slackbot channel. Assuming the app is called consoledotlog our end result should look like this.


Image for post
Image for post

This post assumes you have a Slack App set up and a working knowledge of Slack and Node.

The goal here is to be able to list all the users for a specific Slack workspace. This will give access to the IDs for each user and other useful information.

Go to your app on Slack. On the left side of the page find Features => OAuth & Permissions.

Under Scopes, enable users:read.


Image for post
Image for post

This post assumes you have general knowledge of the Webflow platform.

This post will instruct you on how to sell tickets to events using the Webflow platform via Ticket Tailor. We will be embedding code that is given to us by TicketTailor into a Webflow website.

This embed method will not force users to leave your Webflow site to complete the transaction. Instead, the TicketTailor payment and information collection will happen within your site. This can help reduce sales friction that occurs when directing a user away from your site.

You will need:

Create An Event On Ticket Tailor

Here we’ll create an event and then use the embed code from that event in our Webflow site. …


Image for post
Image for post

This post assumes you have a general understanding of NPM and package publishing.

If you’re tired of forgetting to bump your version number in package.json before publishing your private NPM package and getting this error:

ERR! You cannot publish over the previously published versions: 1.1.34

You can add a simple script in our package.json file to automatically bump the version and then publish the package. Add the following to have your version¹ bump from 1.1.2 to 1.1.3 before you publish to your package registry.

package.json{
"scripts": {
"pub": "npm version patch --force && npm publish"
}
}

Now when you’re ready to publish run this with the command:

npm run pub

You will get a passive warning from NPM about using — force, but it can be safely ignored. Your package version will be bumped and the package will publish. …


Image for post
Image for post

This post assumes you have a general understanding of NPM, AppCenter, and CI/CD.

Trying to setup CI/CD for your mobile build pipeline, be it Android or iOS, can be a bit daunting. Because of this Microsoft AppCenter is where a lot of people, particularly solo devs, are landing.

One of the issues you might run into is how to install one of your private NPM packages during the build process. If you aren’t set up correctly you will see an error in the build output that looks something like this:

error An unexpected error occurred: "https://registry.yarnpkg.com/your-pacakge-name-1.1.3.tgz: Request failed "404 Not Found".

This is an error being thrown due to NPM rejecting AppCenter from downloading your package when it runs the pipeline. …


Image for post
Image for post

This post assumes you have a general understanding of GraphQL, AppSync, and DynamoDB.

The GraphQL backend used in AWS AppSync is most often connected to DynamoDB, a NoSQL database. If you’re here you know that a NoSQL database does not provide ordered results when you run a query.

Running an identical query multiple times against a DynamoDB table can produce different set, or order, of results in each response. We can solve that problem with a global secondary index and sort key.

Desired Outcome

Every time you run your new query it returns the objects in order of dueDate, most recent to least recent, from your table.

We’re using dueDate in this example but you can change that to whatever your schema requires. …

About

Phil Andrews

Always be improving : engineer : www.philandrews.io : ig-phlndrws

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store