Use AWS SQS as a clipboard to copy and paste across different systems and platforms

sqs_clipboard

Use AWS SQS as a clipboard to copy and paste across different systems and platforms. Clipboard contents are encrypted in transit and at rest.

Binaries for Windows, MacOS, and Linux can be found on the Releases Page.


Description

This set of programs can be used to copy and paste clipboard text by using an AWS SQS FIFO Queue as an intermediary. To minimize the amount of data transferred, the contents are compressed with the XZ algorithm before sending to the SQS queue via sqscopy and then decompressed upon arrival via sqspaste. A maximum of 256 KB of compressed (and then encoded) data can be sent to the queue.

NOTE: There can be a small AWS cost when using this program. Each copy / paste operation uses 3 SQS requests, plus the data transferred associated with sqspaste and sqspastesmallfile. See Amazon SQS pricing for more details.

Programs

  • sqscopy - send the system clipboard contents to a user-defined AWS SQS FIFO queue
  • sqspaste - get the queue contents and then place it onto the system clipboard
  • sqspurge - remove all entries from the queue
  • sqscopysmallfile - copy a small file to the queue with file name given on command line
    • after XZ compression and base 91 encoding, the resulting file size must be less than 256 KB
  • sqspastesmallfile - retrieve a file from the queue
    • will overwrite an existing file with the same name
    • file name is stored in the queue along with the file
    • no command line arguments needed

AWS Queue Creation

  • Open the Amazon SQS Console
  • Make sure to create a fifo queue instead of a standard queue
    • The name of your queue should end in .fifo
  • Set the Receive message wait time aka long polling to at least 12 seconds
  • Note: Do not check: Content-based deduplication, otherwise you will not be able to copy the exact same contents with a 5 minute interval.
  • Send / Receive Access: Only the queue owner
  • Encryption: Optional, but recommended
    • Data key reuse period: 1 hour
    • A shorter time period provides better security, but results in more calls to AWS KMS, which might incur charges after Free Tier.

AWS Queue Creation - Automation

AWS IAM Permissions

  • Make sure to change the Resource value listed below.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "sqs:DeleteMessage",
                "sqs:GetQueueUrl",
                "sqs:ChangeMessageVisibility",
                "sqs:PurgeQueue",
                "sqs:ReceiveMessage",
                "sqs:DeleteQueue",
                "sqs:SendMessage",
                "sqs:GetQueueAttributes",
                "sqs:ListQueueTags",
                "sqs:CreateQueue" 
            ],
            "Resource": "arn:aws:sqs:region:account-id:QueueName.fifo"
        }
    ]
}

Setting Environment Variables

  • The SQS_CLIPBOARD_URL environment variable should be set to URL of your SQS FIFO Queue
    • This URL can be found on the AWS SQS Dashboard for the queue that you have created
  • How to set environment variables

Setting Configuration File

  • For Windows and MacOS, you might want to set the SQS_CLIPBOARD_URL value in a configuration file instead of using environment variable.
  • This will allow you to launch the programs from the Windows Taskbar or MacOS Dock.
  • To do this you will need to create this file:
    • Windows: %HOMEPATH%\.aws\sqs_clipboard
    • MacOS: ${HOME}/.aws/sqs_clipboard

File format:

[default]
SQS_CLIPBOARD_URL=https://sqs.region.amazonaws.com/account-id/queuename.fifo

Compilation

  • Install GoReleaser
  • Run: goreleaser build --rm-dist --snapshot
  • There should now be 5 resulting binaries found in the dist directory:
    • sqscopy
    • sqspaste
    • sqspurge
    • sqscopysmallfile
    • sqspastesmallfile

You can also create a Mac App by running mac_app_builder.sh


Windows Icons Used

Bundling Icons

AWS Resources

Similar Resources

Aws-console-plugin - The current HashiCorp Vault AWS Secret Engine currently supports the creation of short lived API keys using the IAM User

aws-console-plugin Background The current HashiCorp Vault AWS Secret Engine curr

Feb 7, 2022

Aws-cognito-demo-go - Source code for AWS Cognito in Go

AWS Cognito Demo in Go Source code for YouTube series, AWS Cognito in Go - https

Dec 10, 2022

Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

May 7, 2022

Aws-cdk-go-examples - Example projects using the AWS CDK by Golang

aws-cdk-go-examples Example projects using the AWS CDK by Golang Useful commands

Nov 24, 2022

A note taking app, that you can draw in, syncs to the cloud, and is on most platforms!

About NotDraw About · How to contribute · How to run · Trello · FAQ This is achived because I dont want to work on it anymore Structure Codebase Descr

Jul 11, 2022

Dogecoin GigaWallet is a backend service for creating payment platforms, tipping bots, dogecoin exchanges and more.

Dogecoin GigaWallet is a backend service for creating payment platforms, tipping bots, dogecoin exchanges and more.

The Dogecoin GigaWallet is a backend service which provides a convenient integration API for platforms such as online shops, exchanges, social media p

Nov 3, 2022

Write cloud-agnostic config deployed across multiple clouds

Multy is the easiest way to deploy multi cloud infrastructure Write cloud-agnostic config deployed across multiple clouds. Let's try to deploy a simpl

Dec 25, 2022

This repository shows how can we use `AWS Lambda` to build serverless applications in golang.

Serverless Api in Go with AWS Lambda Here we are going to use AWS Lambda to build serverless applications in golang. Prerequisites You’ll need an AWS

Nov 3, 2021

Use grype to do Docker layer scanning on various AWS ECR repositories

grype-scan-aws-ecr Use https://github.com/anchore/grype/ to do Docker layer scanning on various AWS ECR repositories. kubectl get pods -o custom-colum

Jan 6, 2022
Client-server-golang-sqs - Client Server with SQS and golang

Client Server with SQS and golang Multi-threaded client-server demo with Go What

Feb 14, 2022
Apis para la administracion de notifiaciones, utilizando servicios como AWS SNS y AWS SQS

notificacion_api Servicio para envío de notificaciónes por difusión en AWS SNS Especificaciones Técnicas Tecnologías Implementadas y Versiones Golang

Jan 7, 2022
Foundational systems for gitops-style AWS development workflows

aws-basics Foundational systems for gitops-style AWS development workflows. Prerequisites GitHub and AWS accounts Terraform Golang Bootstrapping Setup

Oct 28, 2021
Command line interface to windows clipboard over KiTTY remote-control printing

kclip Command line interface to windows clipboard over KiTTY remote-control printing About This tool behaves like the cat command, it just tries to pa

Dec 12, 2021
AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.
AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.

AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.

Dec 20, 2022
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.

tutor-pet API Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure. Macro architecture: Code architecture: Pre-Re

Aug 17, 2022
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK)

simples3 : Simple no frills AWS S3 Library using REST with V4 Signing Overview SimpleS3 is a golang library for uploading and deleting objects on S3 b

Nov 4, 2022
Integrate AWS EKS Anywhere cluster with AWS Services
 Integrate AWS EKS Anywhere cluster with AWS Services

This article provides step-by-step instruction on integrating AWS EKS Anywhere with AWS Services so the applications running on customer data center can securely connect with these services.

Mar 6, 2022
A package for access aws service using AWS SDK for Golang

goaws ?? A package for access aws service using AWS SDK for Golang Advantage with goaws package Example for get user list IAM with AWS SDK for Golang

Nov 25, 2021
Aws-parameter-bulk - Export AWS SSM Parameter Store values in bulk to .env files

aws-parameter-bulk Utility to read parameters from AWS Systems Manager (SSM) Par

Oct 18, 2022