Repository navigation
Releases
Kotlin SDK 1.0.0
First stable release of AWS CDK Blocks for Kotlin.
Breaking
- The Gradle plugin's extension, tasks and types are renamed from
AwsBlocksto
CdkBlocks: configure it withcdkBlocks { }, and the codegen tasks are
cdkBlocksCodegen<Variant>andcdkBlocksDumpModel. Inside the extension,
oidc { redirectUrl }is renamedrelayTo, matching the backend's
allowedRelayOrigins. - The generated
Api(server: BlocksServer = Servers.local)constructor is gone. Build a
Blocksinstance and take the API from it:Api()becomesBlocks().api, and
Api(server = s)becomesBlocks(s).api. OneBlocksserves every API over a single
HTTP engine, so keep the instance andclose()it when done. - One error taxonomy, shared with the Swift and Dart clients: every exception extends
BlocksException. Transport failures areTransportException(was
NetworkException).ApiExceptionreplacescodeanddatawithstatus,name
andretriable— match errors bynamewith the newisBlocksError.
TransferableIOExceptionis nowFileTransferException. A JSON-RPC error arriving
with a non-2xx HTTP status throws the sameApiExceptionas one arriving with
HTTP 200. - Each API namespace is called at its own path,
{url}/{namespace}, instead of the
shared/cdk-blocks/api. Deploy the backend with@aws-blocks/core0.8.0 or later,
or any@aws-cdk-blocks/core, before shipping an app built with this version: an
older backend serves only the shared path and rejects the per-namespace one. A proxy
in front of the API must forward the whole/cdk-blocks/api/*subtree. - Generated clients and the codegen defaults use the
/cdk-blocks/apiand
/cdk-blocks/auth/*paths. A server URL still configured with/aws-blocks/apikeeps
working; a bare origin does not, so append/cdk-blocks/apito aservers {}override
such aslocal("http://10.0.2.2:3001"). Aservers {}URL that reaches no RPC is
rejected, and the unusedx-blocks-endpointspec key is dropped. - Unions and string enums that a response can carry are open: an arm or value a newer
backend adds decodes to an unknown variant instead of throwing
SerializationException, so an exhaustivewhenneeds that branch. Such an enum is
now a sealed class rather than a Kotlinenum class: usevalueandfromValuein
place ofnameandvalueOf, andentriesin place ofvalues().ordinal,
EnumSetand comparisons no longer apply. - On the JVM, set
BlocksConfig.applicationIdto keep the session across restarts.
0.2.0 always persisted to~/.blocks; without anapplicationIdthe session is now
held in memory and is gone when the process exits, with no error. The cookie jar also
moved to a single stored entry with no fallback read, so every signed-in user on
Android, iOS and the JVM signs in once more after upgrading. OidcClientis typed by the spec's provider names, so a provider a method does not
declare no longer compiles.OidcClient.signOut()throws when the backend refuses the sign-out.- A realtime subscription that ends throws instead of going quiet.
- Built with Kotlin 2.2.21 (0.2.0: 2.1.21), and depends on kotlinx-serialization-json
1.9.0 (was 1.7.3) and Ktor 3.3.3 (was 3.1.3), which brings OkHttp 5 on JVM and
Android.
Other changes
- Add OIDC sign-in on iOS and JVM. iOS uses
ASWebAuthenticationSession; the JVM
receives the relay on a loopback address it binds per sign-in, so desktop apps need no
relay configuration, and its landing pages are configurable. The JVM holds its session
encryption key in the operating system. - Add
OidcClient.restore(), which reads the backend's session for the client's cookie,
andOidcUsergains the optional fields anAuthblock reports. - Generated clients hydrate transferables inside lists, maps and models, accept a
$ref, emit the declared type and factory call for a bound transferable result, and
produceUnknownTransferablefor a tag with no binding. Codegen reports a declared
binding it cannot apply, and warns whenexcludeNativePackagesnames a package the
spec does not declare. - Set default HTTP timeouts of 30 s connect and 60 s socket.
- Hold the Android credential store on an Android Keystore key, and pin
androidx.security:security-cryptoto the stable1.1.0. - Store the iOS cookie jar with a this-device-only Keychain accessibility class, and
check the result of the system random number generator. - Generated clients compile and round-trip across the whole schema surface: unions with
no discriminator or a boolean one, tuples, self-referencing types, objects with no
properties, inline-object properties,format: uuid,unknownfields, additional
properties, names that collide, type names that are valid files on Windows, and
escaped schema-controlled strings. - Cookie storage no longer loses, over-sends or shares cookies.
- Raw routes resolve against the server URL cut at its first
cdk-blocksor
aws-blockspath segment. - Send an
aws-blocks-kotlinuser-agent token on outbound requests. - Document the
org.jetbrains.kotlin.plugin.serializationplugin the Gradle plugin
requires, the RPC, OIDC and file-transfer exceptions, that an upload to a handle
signed with a content length must send exactly that length, and how the JVM cookie
store keeps its encryption key. The Android and multiplatform examples point at the
shared backend setup and explain how to use the stub identity provider for testing. - The codegen task's "no spec found" error names the
.cdk-blocks-sandboxconfig
directory.
Thanks to @cadivus, @ekjotmultani, @harsh62, @ikenyal, @mattcreaser, @Simone319,
@soberm and @VarshithaPamisetty for their contributions to this release.
aws-cdk-blocks@1.0.0
The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/blocks 0.x
- The package is now
aws-cdk-blocks. Install it in place of@aws-blocks/blocks, and change the import specifiers. - be8864c: Check conversation ownership in
stream(),resume(),getConversation()andgetPendingInterrupts(), and scopegetChannel()to the caller. - c4e4e67: Scope
inferenceOnlysessions to the user by default. - 5f55dac: A web frontend served from another origin than its API can sign in with a federated provider.
- 5f55dac:
Authcan share its user pool with a frontend that signs in directly against Cognito, such as one built with the Amplify client libraries. - 5f55dac: Adds
AuthErrors, the auth error names, with theAuthErrorNametype and theisAuthError()andisAuthErrorName()guards. - 5f55dac:
AuthBasic,AuthCognitoandAuthOIDCare removed. - c95d7c7:
Authlets you keep end users from writing an attribute your app relies on for authorization. - 5f55dac: Show local social and SAML sign-in as unavailable.
- 5f55dac: The local user pool can check authenticator-app (TOTP) codes as Cognito does.
- 5f55dac:
Authoptions: a block-levelstoreand oneprovidersmap. - 5f55dac: Accept a
Secretas a provider client secret. - 5f55dac:
Authcan send its user pool's email through your own Amazon SES identity, with theemailoption. - 5f55dac: Add auth test helpers to
aws-cdk-blocks/utils. - 5f55dac: A signed-in user can set up an authenticator app (TOTP) through
auth.createApi(), with no backend code. - 5f55dac:
subscribeAuthState,getAuthStateSnapshotand a shared auth-state store behindsubmitAuthAction. A sign-in or sign-out reaches every component and tab once. - 5f55dac: Add
Auth(@aws-cdk-blocks/bb-auth), the single authentication Building Block, exported fromaws-cdk-blocks. - 7c1eec5: An app that deployed a SQL block of an earlier release keeps its database.
- c67048e:
Databaseis the only SQL block.@aws-blocks/bb-dataand@aws-blocks/bb-distributed-dataare removed. See "Upgrade from@aws-blocks/bb-data" in thebb-databaseREADME. - 7c23ab9: Upload URLs carry signed constraints, download disposition is opt-in, key validation is stricter, and invalid input returns 400.
- 684e22d:
npm run devstarts the Nuxt and Astro dev servers. - b2eb306: Lifecycle tasks return 0 for success, 1 for failure, 2 for invalid usage and 130 for an interruption.
--output jsongives a structured result. - 792e269: Migration moves recognized generated script wrappers to package tasks and carries generated dev settings into
package.json#blocks.dev. - a34c850: The documentation tasks read the docs shipped with the installed
aws-cdk-blocks, including in hoisted workspaces. - c42ba42: The hidden
.blocks/folder is now.cdk-blocks/, and local data moves from.bb-data/to.cdk-blocks/local/data/. - 703238f: The scaffolded backend folder is
cdk-blocks/instead ofaws-blocks/. - 45a05d1: The per-deploy state directory is now
.cdk-blocks-sandbox/. - 1de6ea4: The reserved URL prefix is now
/cdk-blocks/(/cdk-blocks/api,/cdk-blocks/auth/*and others)./aws-blocks/still works as an alias. - 9ebf67a: An API namespace can run on a
containercompute. - 5f55dac: Opt in to HTTP error statuses for an API namespace.
- 4665f81:
defaults.appIdentitygives each app an identity, so many apps can share one AWS account. - 8894669: Telemetry follows your CDK CLI telemetry setting. The old opt-out (
AWS_BLOCKS_DISABLE_TELEMETRY) is removed. To opt out, runcdk cli-telemetry --disableor setCDK_DISABLE_CLI_TELEMETRY=1. - 2c9005f: Reject malformed native declarations instead of dropping them.
- 44c7377:
defaults.strictNamespacePlacementserves each API namespace only on the compute it is placed on. - 227a856:
withAuth(fn, cookies, { allowAnonymous: true })runsfnsigned out when no cookies are found, instead of throwing a401. - afad513: A plain
allowedOriginsentry such ashttps://app.example.comnow matches exactly, ignoring case. - 5f55dac: New apps now use the unified
Authblock. - 9801a5b: Each deploy stage has its own CDK outputs file.
- 64f7247:
EmailClient.sendBatch()now takes at most 100 messages per call by default. - 93d533a: Add
allowPlainHttp, an explicit opt-out for builders who need a plain-HTTP front door in production. - adb6077: A production synth fails for a front door that would carry sign-in, session cookies or the origin-verify secret over plain HTTP. To keep such a door, set
allowPlainHttp. - fb29c06: Lock the CloudFront door's server origin with a random secret, a regional web ACL and opt-in access logs.
- 40d25ec: Keep credentialed and cookie-setting SSR responses out of the shared edge cache.
- d51b8ee: Add
KnowledgeBase.asAgentTool(), which returns a search tool for an Agent'stoolscallback. - 6d3077e:
KVStoreis the only key-value block:DistributedTableis folded in. A store of release 0.4.0 or earlier needsLegacyKVStore. See "Upgrade from release 0.4.0 or earlier" in thebb-kv-storeREADME. - e1e4844: Tasks run as package scripts (
npm run dev,npm run deployand the others) instead of thecdk-blocksexecutable. Runnpm run migrateto update an older app. - 2095f31:
ctx.request.url.pathnameno longer includes the API Gateway stage when deployed. - 42b84b2: Add
getChannel(namespace, channel, { scope: 'exact' })and validate channel names. - eb60b04: Bind channel handles to the signed-in user, re-check subscriptions on ping, and add
revokeAccess(). - 8894669: The
telemetryapp task is gone. - 58817b0: Service-principal trust policies get
aws:SourceAccountandaws:SourceArnconditions, and the synth checks for them.
Since 1.0.0-rc.2
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/pipeline@1.0.0
The first stable release. The changes since 1.0.0-rc.1 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0 and 1.0.0-rc.1.
Changes since @aws-blocks/pipeline 0.x
- The package is now
@aws-cdk-blocks/pipeline. Install it in place of@aws-blocks/pipeline, and change the import specifiers.
Since 1.0.0-rc.1
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/hosting@1.0.0
The first stable release. The changes since 1.0.0-rc.1 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0 and 1.0.0-rc.1.
Changes since @aws-blocks/hosting 0.x
- The package is now
@aws-cdk-blocks/hosting. Install it in place of@aws-blocks/hosting, and change the import specifiers. - c42ba42: The hidden
.blocks/folder is now.cdk-blocks/, and local data moves from.bb-data/to.cdk-blocks/local/data/. - 703238f: The scaffolded backend folder is
cdk-blocks/instead ofaws-blocks/. - 45a05d1: The per-deploy state directory is now
.cdk-blocks-sandbox/. - 1de6ea4: The reserved URL prefix is now
/cdk-blocks/(/cdk-blocks/api,/cdk-blocks/auth/*and others)./aws-blocks/still works as an alias. - 4665f81:
defaults.appIdentitygives each app an identity, so many apps can share one AWS account. - 93d533a: Add
allowPlainHttp, an explicit opt-out for builders who need a plain-HTTP front door in production. - adb6077: A production synth fails for a front door that would carry sign-in, session cookies or the origin-verify secret over plain HTTP. To keep such a door, set
allowPlainHttp. - fb29c06: Lock the CloudFront door's server origin with a random secret, a regional web ACL and opt-in access logs.
- 40d25ec: Keep credentialed and cookie-setting SSR responses out of the shared edge cache.
- c1fabce:
secretandconfigCLIs print help for--helpand-h.
Since 1.0.0-rc.1
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/create-blocks-app@1.0.0
The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/create-blocks-app 0.x
- The package is now
@aws-cdk-blocks/create-blocks-app. Install it in place of@aws-blocks/create-blocks-app, and change the import specifiers. - c67048e:
Databaseis the only SQL block.@aws-blocks/bb-dataand@aws-blocks/bb-distributed-dataare removed. See "Upgrade from@aws-blocks/bb-data" in thebb-databaseREADME. - c42ba42: The hidden
.blocks/folder is now.cdk-blocks/, and local data moves from.bb-data/to.cdk-blocks/local/data/. - 703238f: The scaffolded backend folder is
cdk-blocks/instead ofaws-blocks/. - 45a05d1: The per-deploy state directory is now
.cdk-blocks-sandbox/. - 1de6ea4: The reserved URL prefix is now
/cdk-blocks/(/cdk-blocks/api,/cdk-blocks/auth/*and others)./aws-blocks/still works as an alias. - 8894669: Telemetry follows your CDK CLI telemetry setting. The old opt-out (
AWS_BLOCKS_DISABLE_TELEMETRY) is removed. To opt out, runcdk cli-telemetry --disableor setCDK_DISABLE_CLI_TELEMETRY=1. - 184df0b: Typecheck the backend with Node types and the browser code without them.
- ba80bbd: Generated apps keep their existing npm lifecycle script names without generating
cdk-blocks/scripts/*.tswrappers. - 5f55dac: New apps create a user pool where users sign in with their email address, matched ignoring case.
- 5f55dac: New apps now use the unified
Authblock. - f32185c: Adds the dashboard command, which starts the Admin UI against your app on a free loopback port.
- 6d3077e: Scaffold data models on
KVStorewith aschemaand akey. - e1e4844: Tasks run as package scripts (
npm run dev,npm run deployand the others) instead of thecdk-blocksexecutable. Runnpm run migrateto update an older app. - 8894669: The
telemetryapp task is gone.
Since 1.0.0-rc.2
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/create-block@1.0.0
The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/create-block 0.x
- The package is now
@aws-cdk-blocks/create-block. Install it in place of@aws-blocks/create-block, and change the import specifiers. - 703238f: The scaffolded backend folder is
cdk-blocks/instead ofaws-blocks/.
Since 1.0.0-rc.2
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/core@1.0.0
The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/core 0.x
- The package is now
@aws-cdk-blocks/core. Install it in place of@aws-blocks/core, and change the import specifiers. - 5f55dac:
Authhasprotect(), for an API namespace that is deny by default. - c67048e:
Databaseis the only SQL block.@aws-blocks/bb-dataand@aws-blocks/bb-distributed-dataare removed. See "Upgrade from@aws-blocks/bb-data" in thebb-databaseREADME. - c42ba42: The hidden
.blocks/folder is now.cdk-blocks/, and local data moves from.bb-data/to.cdk-blocks/local/data/. - 703238f: The scaffolded backend folder is
cdk-blocks/instead ofaws-blocks/. - 45a05d1: The per-deploy state directory is now
.cdk-blocks-sandbox/. - 1de6ea4: The reserved URL prefix is now
/cdk-blocks/(/cdk-blocks/api,/cdk-blocks/auth/*and others)./aws-blocks/still works as an alias. - f133ff8: With
apiFrontDoor: 'cloudfront', CloudFront routes a namespace on acontainercompute straight to its load balancer, so a call can run up to 60 seconds. - 9ebf67a: An API namespace can run on a
containercompute. - 5f55dac: Opt in to HTTP error statuses for an API namespace.
- 4665f81:
defaults.appIdentitygives each app an identity, so many apps can share one AWS account. - c1fabce: Honor
BLOCKS_LOG_LEVELandBLOCKS_LOG_STREAMin the lifecycle scripts. - 41968b7:
AWS_BLOCKS_DISABLE_TEMPLATE_METADATAis renamed toCDK_BLOCKS_DISABLE_TEMPLATE_METADATA. - 8894669: Telemetry follows your CDK CLI telemetry setting. The old opt-out (
AWS_BLOCKS_DISABLE_TELEMETRY) is removed. To opt out, runcdk cli-telemetry --disableor setCDK_DISABLE_CLI_TELEMETRY=1. - 5f55dac: The OpenRPC spec generator describes every schema under a type name with the right shape, and gets an experimental tag for Building Block authors.
- d46dfaf: A deploy no longer points the local dev loop at AWS.
- 81113a3: The local dev server refuses cross-site
text/plainPOSTrequests to the API. Deployed APIs are unchanged. - 2c9005f: Reject malformed native declarations instead of dropping them.
- ebfe2ed: Constructing a
ScopewhosefullIdis already used by a different scope path now logs a warning that names both paths. - 99660fd:
cdk synthfails when a scope or block id puts a character into a resource name that the resource's service rejects. - c1fabce: Read the deploy identity and credentials without deploying.
- 5f55dac: The OpenRPC spec generator describes a TypeScript tuple as a JSON array of positional elements, and a rest parameter typed as a tuple as one parameter per element.
- 44c7377:
defaults.strictNamespacePlacementserves each API namespace only on the compute it is placed on. - 072c3ff: An unrecognized
encryptionvalue onKVStoreorFileBucketfails the synth instead of falling back to the default key. - c67048e:
VpcRequirementsgainsendpointClientSecurityGroupsandendpointClientDependents, for a block that provisions its own compute. - 227a856:
withAuth(fn, cookies, { allowAnonymous: true })runsfnsigned out when no cookies are found, instead of throwing a401. - afad513: A plain
allowedOriginsentry such ashttps://app.example.comnow matches exactly, ignoring case. - f32185c: Adds the dashboard command, which starts the Admin UI against your app on a free loopback port.
- f32185c: Every deploy is recorded in
.cdk-blocks/deploy-history.jsonl. - 9801a5b: Each deploy stage has its own CDK outputs file.
- 93d533a: Add
allowPlainHttp, an explicit opt-out for builders who need a plain-HTTP front door in production. - adb6077: A production synth fails for a front door that would carry sign-in, session cookies or the origin-verify secret over plain HTTP. To keep such a door, set
allowPlainHttp. - dd1c554: The shared execution role's statements are merged before CDK moves any overflow into managed policies. No permission is added.
- 8ece10a: Require source conditions on KMS key policies that name a service principal.
- c607deb: Behind a CloudFront front door,
ctx.request.urlis the URL the client called, not the API Gateway URL. - 2095f31:
ctx.request.url.pathnameno longer includes the API Gateway stage when deployed. - d354055: Add
secretsStore: 'ssm' | 'secrets-manager'toBlocksDefaults. - 58817b0: Service-principal trust policies get
aws:SourceAccountandaws:SourceArnconditions, and the synth checks for them.
Since 1.0.0-rc.2
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/bb-tracer@1.0.0
The first stable release, with no changes since 1.0.0-rc.2. The full notes for every change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/bb-tracer 0.x
- The package is now
@aws-cdk-blocks/bb-tracer. Install it in place of@aws-blocks/bb-tracer, and change the import specifiers.
@aws-cdk-blocks/bb-secret@1.0.0
The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/bb-secret 0.x
- The package is now
@aws-cdk-blocks/bb-secret. Install it in place of@aws-blocks/bb-secret, and change the import specifiers. - d354055: Adds an internal
@aws-cdk-blocks/bb-secret/internalentry point for the generated keys of other blocks.
Since 1.0.0-rc.2
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.
@aws-cdk-blocks/bb-realtime@1.0.0
The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.
Changes since @aws-blocks/bb-realtime 0.x
- The package is now
@aws-cdk-blocks/bb-realtime. Install it in place of@aws-blocks/bb-realtime, and change the import specifiers. - 42b84b2: Add
getChannel(namespace, channel, { scope: 'exact' })and validate channel names. - eb60b04: Bind channel handles to the signed-in user, re-check subscriptions on ping, and add
revokeAccess(). - d354055: The connection token key now follows
defaults.secretsStore.
Since 1.0.0-rc.2
- 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.