Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/audit-log-viewer/functions/lib/storage/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ const URL_TTL_SECONDS = 900;

/**
* Contentful Functions do not support node:http/https — every client must use
* the fetch-based handler. forcePathStyle keeps S3 hostnames bucket-independent
* so the manifest allowNetworks list stays static.
* the fetch-based handler.
*
* forcePathStyle keeps S3 hostnames bucket-independent so the manifest
* allowNetworks wildcard ("*.amazonaws.com") stays static. Note: path-style
* addressing is deprecated by AWS for buckets created after Sep 2020 and is
* unsupported in some newer opt-in regions. If you encounter NoSuchBucket or
* endpoint errors, remove forcePathStyle and add your bucket's regional
* hostname to allowNetworks in contentful-app-manifest.json instead.
*/
export async function createS3Client(cfg: StorageConfig): Promise<S3Client> {
let credentials: { accessKeyId: string; secretAccessKey: string; sessionToken?: string } = {
Expand Down
1 change: 0 additions & 1 deletion examples/audit-log-viewer/functions/lib/storage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface ListResult {
truncated: boolean;
}

/** Seam for a future second storage provider (Azure/GCS) — S3 is the only impl for now. */
export interface LogStorageProvider {
listLogFiles(startDate: string, endDate: string): Promise<ListResult>;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/audit-log-viewer/src/locations/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const Page = () => {
load(startDate, endDate);
}}
>
Apply
Load logs
</Button>
</Flex>

Expand Down
Loading