Comments (5)
@claughinghouse Just released 0.137. Swapped out R2 with KV. No need for the R2 tokens.
If you run into the "The bucket you tried to delete is not empty" error when deploying, go to ur R2 dashboard and delete all files in it, then run deploy again.
from ion.
@claughinghouse Currently, StaticSite uses R2 bucket to store assets. You'd need to create an R2 token via the R2 Console > Manage R2 tokens. That token will give you an ACCESS KEY and SECRET KEY. And then pass those in via environment variable. ie.
CLOUDFLARE_R2_ACCESS_KEY_ID=xxxxxx CLOUDFLARE_R2_SECRET_ACCESS_KEY=yyyyyy
That said, I'm making a change to StaticSite to use RV for storing assets. So in the next version, it won't use R2, and you won't need this token. Just the API Token would be enough.
from ion.
Same results after upgrading to v0.0.135 and logging into both AWS SSO and runningpnpm wrangler d1 list
returns a list of my DBs. Wrangler returns a message that indicates that is picked up the environment variable apiToken:
sst dev --verbose
time=2024-03-11T14:21:43.499-04:00 level=INFO msg=plugins files="[d resource-aws-v6.10.0/ - resource-aws-v6.10.0.lock d resource-cloudflare-v5.22.0/ - resource-cloudflare-v5.22.0.lock]"
time=2024-03-11T14:21:43.501-04:00 level=INFO msg="no existing server found, starting new one"
time=2024-03-11T14:21:43.505-04:00 level=INFO msg="waiting for server to start"
SST ❍ ion 0.0.135 ready!
➜ App: appname
Stage: cody
~ Deploying
(node:65562) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
| Creating sst:cloudflare:StaticSite → pulumi-nodejs:dynamic:Resource → WwwAssetFiles
| Error sst:cloudflare:StaticSite → pulumi-nodejs:dynamic:Resource → WwwAssetFiles
| Resolved credential object is not valid
❌ Failed
sst:cloudflare:StaticSite → pulumi-nodejs:dynamic:Resource → WwwAssetFiles
Resolved credential object is not valid
from ion.
@claughinghouse Currently, StaticSite uses R2 bucket to store assets. You'd need to create an R2 token via the R2 Console > Manage R2 tokens. That token will give you an ACCESS KEY and SECRET KEY. And then pass those in via environment variable. ie.
CLOUDFLARE_R2_ACCESS_KEY_ID=xxxxxx CLOUDFLARE_R2_SECRET_ACCESS_KEY=yyyyyy
That said, I'm making a change to StaticSite to use RV for storing assets. So in the next version, it won't use R2, and you won't need this token. Just the API Token would be enough.
I will give it a try. I posted my update above right as you had posted the info about R2. Thank you and I will report back shortly!
This is the current permission list for the apiToken:
from ion.
@claughinghouse Currently, StaticSite uses R2 bucket to store assets. You'd need to create an R2 token via the R2 Console > Manage R2 tokens. That token will give you an ACCESS KEY and SECRET KEY. And then pass those in via environment variable. ie.
CLOUDFLARE_R2_ACCESS_KEY_ID=xxxxxx CLOUDFLARE_R2_SECRET_ACCESS_KEY=yyyyyy
That said, I'm making a change to StaticSite to use RV for storing assets. So in the next version, it won't use R2, and you won't need this token. Just the API Token would be enough.
This did the trick. I will close the issue pending the next version you listed. Thank you @fwang!
from ion.
Related Issues (20)
- Redirects are not supported when DNS is disabled
- Provisioned concurrency for lambda
- Docs: component versioning
- Expo cant bundle with sst HOT 2
- Transform errors | Nuxt | Type 'void' is not assignable to type 'undefined'. HOT 1
- API routes in NextJS don't return any data
- SST state and assets S3 buckets fail AWS Security hub
- Remix/SsrSite: allow cloudFrontFunctions custom injections for serverCfFunction & staticCfFunction
- Default Lambda policies not being managed on changes
- Can't create AWS Lambda router: "The parameter origin name must be a domain name."
- Could not open a new TTY when running sst install
- middleware "error": Routing failed. TypeError: globalThis.__import_unsupported is not a function
- Remix Vite Config Resolution Broken in Monorepos HOT 1
- either 'content' (presen t: true) or 'data' (present: false) must be provided - cloudflare HOT 3
- Unable to get environment variables injected into NextJS Site Deployment HOT 2
- Menu button on website no longer works for mobile HOT 1
- Outdated Cloudflare DNS Record Args
- Support deployment with lambda@edge
- Specific version installation is not working for 3.0 HOT 1
- Install script redownloads SST on every execution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ion.