diff --git a/README.md b/README.md index 2e29758c..6abe4da4 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ publishing them for you. | [redis](./redis) | [@winglibs/redis](https://www.npmjs.com/package/@winglibs/redis) | sim | | [sagemaker](./sagemaker) | [@winglibs/sagemaker](https://www.npmjs.com/package/@winglibs/sagemaker) | sim, tf-aws | | [simtools](./simtools) | [@winglibs/simtools](https://www.npmjs.com/package/@winglibs/simtools) | sim | -| [sns](./sns) | [@winglibs/sns](https://www.npmjs.com/package/@winglibs/sns) | sim, tf-aws | +| [sns](./sns) | [@winglibs/sns](https://www.npmjs.com/package/@winglibs/sns) | awscdk, sim, tf-aws | | [tf](./tf) | [@winglibs/tf](https://www.npmjs.com/package/@winglibs/tf) | sim, tf-aws | | [tsoa](./tsoa) | [@winglibs/tsoa](https://www.npmjs.com/package/@winglibs/tsoa) | sim | | [vite](./vite) | [@winglibs/vite](https://www.npmjs.com/package/@winglibs/vite) | sim, tf-aws | diff --git a/sns/README.md b/sns/README.md index 09149508..238b716c 100644 --- a/sns/README.md +++ b/sns/README.md @@ -1,6 +1,6 @@ # sns -This library allows you to interact with the AWS SNS Service +This library allows you to interact with the AWS SNS Service. ## Prerequisites @@ -18,6 +18,10 @@ npm i @winglibs/sns bring sns; let client = new sns.MobileClient(); + +test "sending an SMS" { + client.publish(PhoneNumber: "+14155552671", Message: "Hello"); +} ``` ## License diff --git a/sns/tfaws.w b/sns/aws.w similarity index 100% rename from sns/tfaws.w rename to sns/aws.w diff --git a/sns/lib.w b/sns/lib.w index 44b89101..29e39db5 100644 --- a/sns/lib.w +++ b/sns/lib.w @@ -1,9 +1,10 @@ bring util; bring "./types.w" as types; bring "./sim.w" as sim; -bring "./tfaws.w" as tfaws; +bring "./aws.w" as aws; /// MobileClient is a client for interacting with SNS mobile service. +/// No cloud resources are created when using this class. /// When running the simulator in a non test environment, it will use the /// actual cloud implementation. pub class MobileClient impl types.IMobileClient { @@ -14,10 +15,12 @@ pub class MobileClient impl types.IMobileClient { if std.Node.of(this).app.isTestEnvironment { this.inner = new sim.MobileClient(); } else { - this.inner = new tfaws.MobileClient(); + this.inner = new aws.MobileClient(); } } elif target == "tf-aws" { - this.inner = new tfaws.MobileClient(); + this.inner = new aws.MobileClient(); + } elif target == "awscdk" { + this.inner = new aws.MobileClient(); } else { throw "Unsupported target {target}"; } diff --git a/sns/package.json b/sns/package.json index 939e0790..ffe8276c 100644 --- a/sns/package.json +++ b/sns/package.json @@ -14,6 +14,7 @@ "wing": { "platforms": [ "tf-aws", + "awscdk", "sim" ] },