Posts tagged: cloud
All posts with the tag "cloud"
Another Big Cloud Outage Nov 2025
Before deploying to cloudflare pages with wrangler you need a cloudflare api token. You can get one at dash.cloudflare.com/profile/api-tokens.
Install Wrangler #
Next install wrangler using npm.
npm i -g wrangler
Create a Project #
Before you deploy to cloudflare pages you need to create a project. You might already have one, or you might want to create one in the webui, but you have the option to create it at the command line with wrangler.
npx wrangler pages deploy markout --project-name reader-waylonwalker-com --branch markout
Deploy #
Now you can deploy your static application using wrangler to cloudflare pages.
In this example I have my application built into the markout directory, and since the production branch is named
markoutI need to pass that in here as well.
wrangler pages deploy markout --project-name reader-waylonwalker-com --branch markout
Upon first running an aws cli command using localstack you might end up with the following error.
Unable to locate credentials. You can configure credentials by running "aws configure".
Easy way #
The easy easiest way is to leverage a package called awscli-local.
pipx install awscli-local
Leveraging the awscli #
If you want to use the cli pro
pipx install awscli
aws config --profile localstack
# put what you want for the keys, but enter a valid region like us-east-1
alias aws='aws --endpoint-url http://localhost:4566 --profile localstack'
I ran into an issue where I was unable to ask localstack for its status. I would run the command and it would tell me that it didn’t have permission to read files from my own home directory. Let’s fix it
The issue #
I would run this to ask for the status.
localstack status
And get this error
PermissionError: [Errno 13] Permission denied: '/home/waylon/.cache/localstack/image_metadata'
What happened #
It dawned on me that the first time I ran localstack was straight docker, not the python cli. When docker runs it typically runs as root unless the Dockerfile sets up a user and group for it.
How to fix it #
If you have sudo access to the machine you are on you can recursively change
ownership to your user and group. I chose to just give myself ownership of my
whole ~/.cache directory you could choose a deeper directory if you want. I
feel pretty safe giving myself ownership to my own cache directory on my own
machine.
whoami
# waylon
chown -R waylon:waylon ~/.cache
Now it’s working #
Running localstack status now gives me a nice status message rather than an error.
❯ localstack status
┌─────────────────┬───────────────────────────────────────────────────────┐
│ Runtime version │ 1.2.1.dev │
│ Docker image │ tag: latest, id: dbbfe0ce0008, 📆 2022-10-15T00:51:03 │
│ Runtime status │ ✖ stopped │
└─────────────────┴───────────────────────────────────────────────────────┘