@ampless/backend 1.0.0-beta.79 → 1.0.0-beta.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -170,6 +170,7 @@ declare function amplessAuthConfig(opts?: AmplessAuthConfigOpts): Parameters<typ
170
170
  * Build the ampless S3 bucket configuration as a plain options object
171
171
  * suitable for `defineStorage(...)`. Access map:
172
172
  * - `public/media/*` — guest read, admin/editor full
173
+ * - `public/static/*` — guest read, admin/editor full (static-bundle posts)
173
174
  * - `public/plugins/*` — guest read, admin full
174
175
  *
175
176
  * Bucket-level overrides (PublicAccessBlock, CORS, IAM policies for
package/dist/index.js CHANGED
@@ -304,6 +304,16 @@ function amplessStorageConfig() {
304
304
  allow.guest.to(["read"]),
305
305
  allow.groups(["ampless-admin", "ampless-editor"]).to(["read", "write", "delete"])
306
306
  ],
307
+ // Static-bundle posts (`format: 'static'`) upload their files to
308
+ // `public/static/<slug>/...` from the browser admin via Cognito
309
+ // identity-pool credentials. Without this rule the admin group's
310
+ // role is denied `s3:PutObject` and saving the post fails. Mirrors
311
+ // the media grant; the MCP/Lambda upload path is granted separately
312
+ // on the function role in `defineAmplessBackend`.
313
+ "public/static/*": [
314
+ allow.guest.to(["read"]),
315
+ allow.groups(["ampless-admin", "ampless-editor"]).to(["read", "write", "delete"])
316
+ ],
307
317
  "public/plugins/*": [
308
318
  allow.guest.to(["read"]),
309
319
  allow.groups(["ampless-admin"]).to(["read", "write", "delete"])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampless/backend",
3
- "version": "1.0.0-beta.79",
3
+ "version": "1.0.0-beta.80",
4
4
  "description": "Amplify Gen 2 backend factories for ampless: auth, data, storage, event processors, API key renewer",
5
5
  "license": "MIT",
6
6
  "type": "module",