From 4749b3aa2d9ff1b6d9139e2d5739c382a5bc583b Mon Sep 17 00:00:00 2001 From: "Sarath Kumar K.S" Date: Sat, 28 Jun 2025 18:04:02 -0700 Subject: [PATCH 1/3] Personalized SMS Briefing using serverless architecture --- .../CODE_OF_CONDUCT.md | 4 + .../CONTRIBUTING.md | 59 ++++++ lambda-bedrock-endusermessaging/README.md | 177 ++++++++++++++++ lambda-bedrock-endusermessaging/app.py | 17 ++ lambda-bedrock-endusermessaging/cdk.json | 94 +++++++++ .../example-pattern.json | 56 +++++ ...personalized_sms_briefing_architecture.jpg | Bin 0 -> 32422 bytes .../sms_sender/personalize_daily_briefing.py | 90 ++++++++ .../lambda/sms_sender/requirements.txt | 1 + .../lambda/weather_agent/requirements.txt | 1 + .../lambda/weather_agent/weather_agent.py | 196 ++++++++++++++++++ .../__init__.py | 0 .../constants.py | 8 + ...personalized_sms_briefing_bedrock_stack.py | 187 +++++++++++++++++ .../requirements.txt | 5 + lambda-bedrock-endusermessaging/source.bat | 13 ++ lambda-bedrock-endusermessaging/src/app.js | 10 + lambda-bedrock-endusermessaging/template.yaml | 16 ++ .../tests/__init__.py | 0 .../tests/unit/__init__.py | 0 ...personalized_sms_briefing_bedrock_stack.py | 15 ++ 21 files changed, 949 insertions(+) create mode 100644 lambda-bedrock-endusermessaging/CODE_OF_CONDUCT.md create mode 100644 lambda-bedrock-endusermessaging/CONTRIBUTING.md create mode 100644 lambda-bedrock-endusermessaging/README.md create mode 100644 lambda-bedrock-endusermessaging/app.py create mode 100644 lambda-bedrock-endusermessaging/cdk.json create mode 100644 lambda-bedrock-endusermessaging/example-pattern.json create mode 100644 lambda-bedrock-endusermessaging/images/personalized_sms_briefing_architecture.jpg create mode 100644 lambda-bedrock-endusermessaging/lambda/sms_sender/personalize_daily_briefing.py create mode 100644 lambda-bedrock-endusermessaging/lambda/sms_sender/requirements.txt create mode 100644 lambda-bedrock-endusermessaging/lambda/weather_agent/requirements.txt create mode 100644 lambda-bedrock-endusermessaging/lambda/weather_agent/weather_agent.py create mode 100644 lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/__init__.py create mode 100644 lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/constants.py create mode 100644 lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/personalized_sms_briefing_bedrock_stack.py create mode 100644 lambda-bedrock-endusermessaging/requirements.txt create mode 100644 lambda-bedrock-endusermessaging/source.bat create mode 100644 lambda-bedrock-endusermessaging/src/app.js create mode 100644 lambda-bedrock-endusermessaging/template.yaml create mode 100644 lambda-bedrock-endusermessaging/tests/__init__.py create mode 100644 lambda-bedrock-endusermessaging/tests/unit/__init__.py create mode 100644 lambda-bedrock-endusermessaging/tests/unit/test_personalized_sms_briefing_bedrock_stack.py diff --git a/lambda-bedrock-endusermessaging/CODE_OF_CONDUCT.md b/lambda-bedrock-endusermessaging/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..5b627cfa6 --- /dev/null +++ b/lambda-bedrock-endusermessaging/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/lambda-bedrock-endusermessaging/CONTRIBUTING.md b/lambda-bedrock-endusermessaging/CONTRIBUTING.md new file mode 100644 index 000000000..c4b6a1c50 --- /dev/null +++ b/lambda-bedrock-endusermessaging/CONTRIBUTING.md @@ -0,0 +1,59 @@ +# Contributing Guidelines + +Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional +documentation, we greatly value feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests to ensure we have all the necessary +information to effectively respond to your bug report or contribution. + + +## Reporting Bugs/Feature Requests + +We welcome you to use the GitHub issue tracker to report bugs or suggest features. + +When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already +reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: + +* A reproducible test case or series of steps +* The version of our code being used +* Any modifications you've made relevant to the bug +* Anything unusual about your environment or deployment + + +## Contributing via Pull Requests +Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: + +1. You are working against the latest source on the *main* branch. +2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. +3. You open an issue to discuss any significant work - we would hate for your time to be wasted. + +To send us a pull request, please: + +1. Fork the repository. +2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. +3. Ensure local tests pass. +4. Commit to your fork using clear commit messages. +5. Send us a pull request, answering any default questions in the pull request interface. +6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. + +GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). + + +## Finding contributions to work on +Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. + + +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. + + +## Security issue notifications +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. + + +## Licensing + +See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. diff --git a/lambda-bedrock-endusermessaging/README.md b/lambda-bedrock-endusermessaging/README.md new file mode 100644 index 000000000..98bf0e626 --- /dev/null +++ b/lambda-bedrock-endusermessaging/README.md @@ -0,0 +1,177 @@ +# Amazon Lambda - Bedrock - End user messaging + +This sample pattern delivers personalized daily briefing SMS messages using Lambda, AWS End User Messaging and Amazon Bedrock. It combines real-time weather data with Amazon Bedrock's AI models to create natural language weather summaries that are automatically delivered to users' phones at their preferred time. You can extend this pattern to deliver additional personalized content such as news headlines, stock market updates, or sports scores by integrating relevant APIs and adapting the AI prompt engineering approach. + +Built with a serverless-first approach, this solution automatically sends you tailored information at your preferred time each day, eliminating the need to manually check multiple sources. + +**Important:** this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example. + +### Getting Started + +The entire solution is built using AWS Cloud Development Kit (CDK) and AWS Lambda functions running on Python 3.11 runtime. This serverless architecture ensures minimal operational overhead while providing maximum flexibility for customization. + +### Requirements + +* [Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources. +* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured +* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +* [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) installed +* [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com/) installed (required for CDK) +* [Docker](https://www.docker.com/) is installed and the docker daemon is running +* This solution requires an [WeatherAPI](https://www.weatherapi.com//) API key. To obtain one, please create a free account at [Weatherapi.com](https://www.weatherapi.com/) and retrieve your API key. +* A destination phone number to receive SMS messages +* An originating number based on your [country’s requirements](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) +* Access to Bedrock Foundation Models. Please refer to this [documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html) to add or remove access to Bedrock foundation models. In this example, we are using the Anthropic Claude 3 Haiku foundation model. + +### AWS Services Used + +* AWS Lambda +* Amazon Bedrock +* AWS Secret Manager +* Amazon EventBridge +* AWS End User Messaging + +### Architecture Diagram +architecture + +### How it works + +* EventBridge triggers the Lambda function daily at your specified time +* Main Lambda function performs the following actions: + * Invokes the Weather Agent Lambda to retrieve weather data from the WeatherAPI and summarize the content with Bedrock + * Receives the processed message and uses End User Messaging to send SMS + +### Deployment Instructions + +1. Create a new directory, navigate to that directory in a terminal and clone the GitHub repository: + ``` + git clone https://github.com/aws-samples/serverless-patterns/ + ``` +2. Change directory to the pattern directory: + ``` + cd lambda-bedrock-endusermessaging + ``` + +3. Create [AWS Secrets Manager Secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) Secrets for your WeatherAPI key,destination phone number, and origination phone number. + + Log in to your AWS account and navigate to the AWS Secrets Manager service in the AWS Console in your preferred region. Then select the Store a new secret button. + + For the secret type, select Other type of secret. Under Key/value pair, select the Plaintext tab and enter the weather API key. For the encryption key, you can either encrypt using the AWS KMS key that AWS Secrets Manager creates or use a customer-managed AWS KMS key that you create. Select Next, provide the secret name as WeatherAPIKey, select Next, and click the Store button to create the secret. Note the secret ARN, as this will be needed for the next step. + + Repeat this process for your destination and origination phone numbers, creating separate secrets named DestinationPhone and OriginationPhone respectively. + + If you prefer the CLI option, use the commands below. Replace the placeholder values with your actual API key, destination, and origination phone numbers, along with your preferred region. + + ``` + aws secretsmanager create-secret \ + --name "WeatherAPIKey" \ + --description "API key for WeatherAPI service" \ + --secret-string "your-actual-weather-api-key-here" \ + --region us-east-1 + + + aws secretsmanager create-secret \ + --name "OriginationPhone" \ + --description "Origination phone number for SMS sending" \ + --secret-string "+12065550100" \ + --region us-east-1 + + aws secretsmanager create-secret \ + --name "DestinationPhone" \ + --description "Destination phone number for weather alerts" \ + --secret-string "+12065550123" \ + --region us-east-1 + + ``` + +4. Edit the constants.py file under the folder personalized_sms_briefing_bedrock and customize the following parameters according to your preferences: + 1. DESTINATION_PHONE_NUMBER: The phone number where you want to receive SMS briefings + 2. ORIGINATION_IDENTITY_PHONE_NUMBER: Your verified sender ID for SMS messages + 3. LOCATION: Your preferred location for weather forecasts + 4. SCHEDULE_HOUR and SCHEDULE_MINUTE: Your desired delivery time (in UTC) + 5. AWS_BEDROCK_MODEL_ID: The Bedrock model to use for content generation + 6. WEATHER_API_KEY: Your personal API key from WeatherAPI + + Example below + + ``` + DESTINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:destination-phone-Abc123" + ORIGINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:origination-phone-Def456" + WEATHER_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:weather-api-key-Ghi789" + LOCATION = "Seattle" + SCHEDULE_HOUR = 15 + SCHEDULE_MINUTE = 0 + AWS_BEDROCK_MODEL_ID= "anthropic.claude-3-haiku-20240307-v1:0" + + ``` + +5. Create a virtualenv on MacOS and Linux + ``` + python3 -m venv .venv + ``` +6. After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv + ``` + source .venv/bin/activate + ``` + [Optional - for Windows] If you are a Windows platform, you would activate the virtualenv with below command + + ``` + .venv\Scripts\activate.bat + ``` +7. Once the virtualenv is activated, you can install the required dependencies + ``` + pip install -r requirements.txt + ``` +8. Synthesize the CloudFormation template for this code + ``` + cdk synth + ``` +9. Deploy the stack + + ``` + cdk deploy + ``` +### Testing Your Deployment + +* For quick verification of your deployment using only the AWS CLI.Invoke the SMS sender function to trigger an immediate briefing: + + ``` + aws lambda invoke \ + --function-name $(aws cloudformation describe-stacks --stack-name PersonalizedSmsBriefingBedrockStack --query "Stacks[0].Outputs[?OutputKey=='SmsSenderFunctionName'].OutputValue" --output text) \ + --payload '{}' \ + --cli-binary-format raw-in-base64-out \ + response.json + + ``` + +* Check the execution status for detailed logs and any error messages.You should also have received an SMS on the destination phone number. + + ``` + cat response.json + ``` + +### SMS Message samples + +``` + "Hello! It's 59°F in Seattle. Partly cloudy. Grab a light jacket and enjoy the day! 🌤️" + "Hello! It's 45°F in Chicago. Overcast skies. Layer up and stay cozy! ☁️" +``` +### Cleanup + +1. To cleanup/delete resources created while deploying the solution, go to the root folder of the project repository and run + ``` + cdk destroy + ``` + +### Useful commands + + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +------ +Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: MIT-0 diff --git a/lambda-bedrock-endusermessaging/app.py b/lambda-bedrock-endusermessaging/app.py new file mode 100644 index 000000000..85ab29a7a --- /dev/null +++ b/lambda-bedrock-endusermessaging/app.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +import os +import aws_cdk as cdk +from personalized_sms_briefing_bedrock.personalized_sms_briefing_bedrock_stack import PersonalizedSmsBriefingBedrockStack + +app = cdk.App() + +PersonalizedSmsBriefingBedrockStack( + app, + "PersonalizedSmsBriefingBedrockStack", + env=cdk.Environment( + account=os.getenv('CDK_DEFAULT_ACCOUNT'), + region=os.getenv('CDK_DEFAULT_REGION') + ) +) + +app.synth() \ No newline at end of file diff --git a/lambda-bedrock-endusermessaging/cdk.json b/lambda-bedrock-endusermessaging/cdk.json new file mode 100644 index 000000000..0216f6516 --- /dev/null +++ b/lambda-bedrock-endusermessaging/cdk.json @@ -0,0 +1,94 @@ +{ + "app": "python3 app.py", + "watch": { + "include": [ + "**" + ], + "exclude": [ + "README.md", + "cdk*.json", + "requirements*.txt", + "source.bat", + "**/__init__.py", + "**/__pycache__", + "tests" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true, + "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, + "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, + "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, + "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true, + "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true, + "@aws-cdk/aws-eks:nodegroupNameAttribute": true, + "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true, + "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true, + "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false, + "@aws-cdk/aws-s3:keepNotificationInImportedBucket": false, + "@aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature": false, + "@aws-cdk/aws-ecs:disableEcsImdsBlocking": true, + "@aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions": true, + "@aws-cdk/aws-dynamodb:resourcePolicyPerReplica": true, + "@aws-cdk/aws-ec2:ec2SumTImeoutEnabled": true, + "@aws-cdk/aws-appsync:appSyncGraphQLAPIScopeLambdaPermission": true, + "@aws-cdk/aws-rds:setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId": true, + "@aws-cdk/core:cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics": true, + "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": true, + "@aws-cdk/aws-stepfunctions-tasks:fixRunEcsTaskPolicy": true, + "@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault": true, + "@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": true, + "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": true, + "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": true, + "@aws-cdk/core:enableAdditionalMetadataCollection": true, + "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": false, + "@aws-cdk/aws-s3:setUniqueReplicationRoleName": true, + "@aws-cdk/aws-events:requireEventBusPolicySid": true, + "@aws-cdk/core:aspectPrioritiesMutating": true, + "@aws-cdk/aws-dynamodb:retainTableReplica": true, + "@aws-cdk/aws-stepfunctions:useDistributedMapResultWriterV2": true, + "@aws-cdk/s3-notifications:addS3TrustKeyPolicyForSnsSubscriptions": true, + "@aws-cdk/aws-ec2:requirePrivateSubnetsForEgressOnlyInternetGateway": true, + "@aws-cdk/aws-s3:publicAccessBlockedByDefault": true + } +} diff --git a/lambda-bedrock-endusermessaging/example-pattern.json b/lambda-bedrock-endusermessaging/example-pattern.json new file mode 100644 index 000000000..f657f5790 --- /dev/null +++ b/lambda-bedrock-endusermessaging/example-pattern.json @@ -0,0 +1,56 @@ +{ + "title": "Lambda - Bedrock - End user messaging", + "description": "Personalized SMS briefing using AWS Lambda, Bedrock and end user messaging", + "language": "Python", + "level": "300", + "framework": "CDK", + "introBox": { + "headline": "How it works", + "text": [ + "This pattern demonstrates how to build a personalized SMS messaging system that leverages Amazon Bedrock's generative AI capabilities to enhance user communications using a serverless architecture." + ] + }, + "gitHub": { + "template": { + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-bedrock-endusermessaging", + "templateURL": "serverless-patterns/lambda-bedrock-endusermessaging", + "projectFolder": "lambda-bedrock-endusermessaging", + "templateFile": "personalized_sms_briefing_bedrock/personalized_sms_briefing_bedrock_stack.py" + } + }, + "resources": { + "bullets": [ + { + "text": "Amazon Bedrock", + "link": "https://aws.amazon.com/bedrock/" + }, + { + "text": "AWS End User Messaging", + "link": "https://aws.amazon.com/end-user-messaging/" + } + ] + }, + "deploy": { + "text": [ + "Deploy the stack:cdk deploy." + ] + }, + "testing": { + "text": [ + "See the GitHub repo for detailed testing instructions." + ] + }, + "cleanup": { + "text": [ + "Delete the stack: cdk delete." + ] + }, + "authors": [ + { + "name": "Sarath Kumar K.S", + "image": "https://i.postimg.cc/6qpwHbWD/IMG-0258.jpg", + "bio": "Sarath is a Senior Technical Account Manager at AWS.", + "linkedin": "kssarathkumar" + } + ] +} diff --git a/lambda-bedrock-endusermessaging/images/personalized_sms_briefing_architecture.jpg b/lambda-bedrock-endusermessaging/images/personalized_sms_briefing_architecture.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2c5bb5656f39964c3562daa0b7171dd7c1eebf94 GIT binary patch literal 32422 zcmce-1z4NSwl5wEg|-wZMT-|H4#nL{ad!yz;S$`PmbSPREnXx@u;LCa?i5Lo5L}7{ z4-S{^eb4#6v;TYFbMNy%=gj-$eOG4I%&awUvSzKB-`vgIEdib>$|}eL(9i$?wEGKi zw}LjKAT4dGuBj%gpe*zEf_}h#!gvh;I68T_Y0AB!(Ki6nU@iT<#_uvS3wM{_&wr8b z+eN{Cw+;YIvi}R7|5Ns3ODlJadxnGi553!c=l8-A-qVCOf2Wy#)8>DtMSs)Y9xfjD zJnFw`H*HPnd)o4zX0rJUZT=V9!o}@3fAl?%sH21D@4kMg-x5Eya?;Vde?GeZPypNk zngBV#o8S81f4@)8c>sXmDFA>T|7V_g8UWDn2>>9S`!kRJD*%A^5df$k`!ny)F>x_- zGy7X}829%F*46;PQ4s)uV*mgU`~(1=82+v7{`N0qqq#4lxR=ZM{;~l$0IUEs00n>( zzyiQ=PjLfY1GoVEcW{6-0R6%5^!tu}pD-{ney2y6m=7@@KYH@y@uSC&pFG8T`UD#n z`|)EOd>mZ7XV37TJ$d?^;Q2Fxd-~b$M$mrOM8|k^U-23CW9<9f|HpLq9f1D`&FaAz zIvOqD0X`Z!KH6P3fbxF0AE2Y%r+?EHfc5BJE)4Vszl&|20q#3~fPwb#G1k+k*bg87 zjUD45CKmpq=L9dg2uW$BG#-=a>YF8})J_r+({T%eC*El4=$Tu)eoU(AhSCd2TX}kU zzyI{PZu|w0khXz^M@T|$6$7uzE}9Z}p1fcEe&QUCxC??(#j(ci?7 z!3R7*yC1)Y4{};-ljOBmmp#v^0;x-_g z=bHUP6?j;=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l*DbLv5c^y<7D>GGyAFZDd@Ja-@a`aOJT1N?O1Dm1<)42WY6VW z-EGXI@4!A5wg5y^tnS*8t*)&-;C(jI*f2Z5 zf#bh=>z{d{J(@)9>?O@iG~6sDi#fO0?oQ&d{JH+q8&z^L$P~H%KgL(AIo2l;GYx zR%r=CjGi5WOEd!n+>FPqQ#7CKj|`JOqo!GXl6z}JV$Qlx0?^ELT+tIwcJI7JIl|6o zTgrZUD_M)F`CjFsSG;J`#x@662+Kj|7YJ-(vDfo2)Lvq`gme z`8X(V?ve>hUeRKQaPhzc4pWz48GGOS;#JLgb-T{mYpfj!D3Yv@b2;VBHCW)lVZBIW z(uq{D3tHr;No_5;AUh&iXy0)&$iZW)=7&DBKfy~t}F<%C@9%}}Ixe(Y2emaJly~rQD2yK9cyb&bP?5NDq z*yPRfDy(!@p1v@e(C#t!fZI#BT4^GN7@;9v`2yyY zz%|o0QGD>Ka`J*TgT@N7ds*-ZxQ(W!g7 z6r#Z&x*xKY6>C81YM3uuy53Y6t8Y-7{6ldH{^8rGSXE{Vv-0(2#(_%64I_(v7E_jH zAwEa(7)$$tLq^HlV(>Cmg&PKYHq6cEBe zK>b^0EJeR%I(&*#owe)H@B2>)!h!w%fIWffA&+sR0=}r zmuvV|Y2IU+Ft)Bz%1JKvyn17Oty94?teS9z<`fU>WUTp%tfmdGu|euC7mL?`DrXCW sYJmLuur(Qb+bvxxZ8YA4F+^C;$Ke literal 0 HcmV?d00001 diff --git a/lambda-bedrock-endusermessaging/lambda/sms_sender/personalize_daily_briefing.py b/lambda-bedrock-endusermessaging/lambda/sms_sender/personalize_daily_briefing.py new file mode 100644 index 000000000..24c5f7e4c --- /dev/null +++ b/lambda-bedrock-endusermessaging/lambda/sms_sender/personalize_daily_briefing.py @@ -0,0 +1,90 @@ +import json +import os +import boto3 +from datetime import datetime + +def invoke_weather_agent(location: str) -> str: + """Invoke weather agent to get intelligent summary""" + + lambda_client = boto3.client('lambda') + + try: + # Invoke weather agent Lambda + response = lambda_client.invoke( + FunctionName=os.environ['WEATHER_AGENT_FUNCTION_NAME'], + InvocationType='RequestResponse', + Payload=json.dumps({ + 'location': location + }) + ) + + # Parse response + payload = json.loads(response['Payload'].read()) + + if payload['statusCode'] == 200: + body = json.loads(payload['body']) + return body['briefing'] + else: + # Use fallback from error response + error_body = json.loads(payload['body']) + return error_body.get('fallback_message', f"Good morning! Have a great day in {location}!") + + except Exception as e: + print(f"Error invoking weather agent: {str(e)}") + return f"Good morning! Weather service temporarily unavailable. Have a wonderful day in {location}!" + +def get_secret_value(secret_arn): + client = boto3.client('secretsmanager') + response = client.get_secret_value(SecretId=secret_arn) + return response['SecretString'] + +def send_sms(phone_number: str, originating_number: str, message: str): + """Send SMS using AWS End User Messaging""" + sms_client = boto3.client('pinpoint-sms-voice-v2') + + response = sms_client.send_text_message( + DestinationPhoneNumber=phone_number, + OriginationIdentity=originating_number, + MessageBody=message + ) + + return response + +def lambda_handler(event, context): + """Main Lambda handler for daily briefing SMS""" + + # Get configuration from environment variables + location = os.environ['LOCATION'] + phone_number = get_secret_value(os.environ['DESTINATION_PHONE_SECRET_ARN']) + originating_number = get_secret_value(os.environ['ORIGINATION_PHONE_SECRET_ARN']) + + + try: + # Get intelligent briefing from weather agent + Bedrock + briefing = invoke_weather_agent(location) + + # Send SMS + sms_response = send_sms(phone_number, originating_number, briefing) + + print(f"SMS sent successfully: {briefing}") + print(f"SMS Message ID: {sms_response.get('MessageId')}") + + return { + 'statusCode': 200, + 'body': json.dumps({ + 'message': 'Daily briefing sent successfully!', + 'briefing': briefing, + 'sms_message_id': sms_response.get('MessageId'), + 'timestamp': datetime.now().isoformat() + }) + } + + except Exception as e: + return { + 'statusCode': 500, + 'body': json.dumps({ + 'error': 'Failed to send daily briefing', + 'details': str(e), + 'timestamp': datetime.now().isoformat() + }) + } \ No newline at end of file diff --git a/lambda-bedrock-endusermessaging/lambda/sms_sender/requirements.txt b/lambda-bedrock-endusermessaging/lambda/sms_sender/requirements.txt new file mode 100644 index 000000000..7734f71ab --- /dev/null +++ b/lambda-bedrock-endusermessaging/lambda/sms_sender/requirements.txt @@ -0,0 +1 @@ +boto3>=1.36.0 \ No newline at end of file diff --git a/lambda-bedrock-endusermessaging/lambda/weather_agent/requirements.txt b/lambda-bedrock-endusermessaging/lambda/weather_agent/requirements.txt new file mode 100644 index 000000000..37912b81e --- /dev/null +++ b/lambda-bedrock-endusermessaging/lambda/weather_agent/requirements.txt @@ -0,0 +1 @@ +requests>=2.31.0 \ No newline at end of file diff --git a/lambda-bedrock-endusermessaging/lambda/weather_agent/weather_agent.py b/lambda-bedrock-endusermessaging/lambda/weather_agent/weather_agent.py new file mode 100644 index 000000000..ce1ac2077 --- /dev/null +++ b/lambda-bedrock-endusermessaging/lambda/weather_agent/weather_agent.py @@ -0,0 +1,196 @@ +import json +import requests +import os +import boto3 +from datetime import datetime +from typing import Dict, Any, Optional + + +class WeatherDataAgent: + + def __init__(self): + self.weather_api_key = get_secret_value(os.environ['WEATHER_API_KEY_SECRET_ARN']) + self.bedrock_client = boto3.client('bedrock-runtime') + self.bedrock_model_id = os.environ.get('AWS_BEDROCK_MODEL_ID', 'anthropic.claude-3-haiku-20240307-v1:0') + + + def fetch_weather_data(self, location: str) -> Optional[Dict[str, Any]]: + """Agent function: Fetch real weather data from WeatherAPI""" + try: + url = "https://api.weatherapi.com/v1/current.json" + params = { + 'key': self.weather_api_key, + 'q': location, + 'aqi': 'no' + } + + response = requests.get(url, params=params, timeout=10) + + if response.status_code != 200: + response.raise_for_status() + + weather_data = response.json() + return weather_data + + except requests.RequestException as e: + print(f"Network error fetching weather data: {str(e)}") + return None + except KeyError as e: + print(f"Unexpected weather data format: {str(e)}") + return None + except Exception as e: + print(f"Unexpected error fetching weather data: {str(e)}") + return None + + def create_structured_data(self, location: str) -> Dict[str, Any]: + """Agent function: Compile weather data into structured format""" + weather_data = self.fetch_weather_data(location) + + if weather_data: + try: + structured_data = { + 'location': location, + 'weather': { + 'temperature': round(weather_data['current']['temp_f']), + 'feels_like': round(weather_data['current']['feelslike_f']), + 'humidity': weather_data['current']['humidity'], + 'description': weather_data['current']['condition']['text'], + 'wind_speed': weather_data['current']['wind_mph'], + 'visibility': weather_data['current']['vis_miles'] + } + } + except KeyError as e: + structured_data = { + 'location': location, + 'weather': None, + 'error': f'Weather data format error: {str(e)}' + } + else: + structured_data = { + 'location': location, + 'weather': None, + 'error': 'Weather data unavailable' + } + + return structured_data + + def summarize_with_bedrock(self, structured_data: Dict[str, Any]) -> str: + if structured_data['weather']: + weather = structured_data['weather'] + weather_context = f""" +Weather Data for {structured_data['location']}: +- Temperature: {weather['temperature']}°F (feels like {weather['feels_like']}°F) +- Conditions: {weather['description']} +- Humidity: {weather['humidity']}% +- Wind Speed: {weather['wind_speed']} mph +- Visibility: {weather['visibility']} miles +""" + else: + weather_context = f""" +Weather data is currently unavailable for {structured_data['location']}. +Error: {structured_data.get('error', 'Unknown error')} +""" + + prompt = f""" +Based on the following weather information, create a personalized briefing: + +{weather_context} + +Requirements: +1. Keep it under 160 characters for SMS +2. Start with "Hello!" +3. ALWAYS mention the temperature in Fahrenheit prominently if available +4. Make it friendly and informative +5. Include practical advice based on weather conditions +6. Do NOT mention seasons, weekends, or time of day +7. If weather data is unavailable, provide a positive message anyway +8. Use appropriate emojis sparingly (2-3 max) + +Format: "Hello! It's [temperature]°F in [location]. [Weather description]. [Practical advice]" +""" + + try: + response = self.bedrock_client.invoke_model( + modelId=self.bedrock_model_id, + body=json.dumps({ + "anthropic_version": "bedrock-2023-05-31", + "max_tokens": 200, + "temperature": 0.4, + "messages": [ + { + "role": "user", + "content": prompt + } + ] + }) + ) + + response_body = json.loads(response['body'].read()) + summary = response_body['content'][0]['text'].strip() + + # Ensure SMS length limit + if len(summary) > 160: + summary = summary[:157] + "..." + + return summary + + except Exception as e: + # Fallback scenario + if structured_data['weather']: + temp = structured_data['weather']['temperature'] + condition = structured_data['weather']['description'] + fallback = f"Hello! It's {temp}°F in {structured_data['location']} with {condition}. Have a great day!" + else: + fallback = f"Hello! Weather info unavailable for {structured_data['location']}, but have a wonderful day!" + + return fallback + +def get_secret_value(secret_arn): + client = boto3.client('secretsmanager') + response = client.get_secret_value(SecretId=secret_arn) + return response['SecretString'] + +def lambda_handler(event, context): + """Main handler for weather agent""" + + agent = WeatherDataAgent() + + # Get location from event or environment + location = event.get('location', os.environ.get('LOCATION', 'Seattle')) + + try: + # Agent fetches and structures data + structured_data = agent.create_structured_data(location) + + # Bedrock FM creates intelligent summary + personalized_briefing = agent.summarize_with_bedrock(structured_data) + + result = { + 'statusCode': 200, + 'body': json.dumps({ + 'briefing': personalized_briefing, + 'location': location, + 'timestamp': datetime.now().isoformat(), + 'weather_available': structured_data['weather'] is not None, + 'debug_info': { + 'weather_data_present': structured_data['weather'] is not None, + 'error': structured_data.get('error', None) + } + }) + } + + return result + + except Exception as e: + import traceback + return { + 'statusCode': 500, + 'body': json.dumps({ + 'error': str(e), + 'fallback_message': f"Hello! Have a great day in {location}!", + 'debug_info': { + 'error_type': type(e).__name__, + 'error_message': str(e) + } + }) + } diff --git a/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/__init__.py b/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/constants.py b/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/constants.py new file mode 100644 index 000000000..9ac774535 --- /dev/null +++ b/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/constants.py @@ -0,0 +1,8 @@ +DESTINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:destination-phone-Abc123" +ORIGINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:origination-phone-Def456" +WEATHER_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:weather-api-key-Ghi789" +LOCATION = "Seattle" +SCHEDULE_HOUR = 15 +SCHEDULE_MINUTE = 0 +AWS_BEDROCK_MODEL_ID= "anthropic.claude-3-haiku-20240307-v1:0" + diff --git a/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/personalized_sms_briefing_bedrock_stack.py b/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/personalized_sms_briefing_bedrock_stack.py new file mode 100644 index 000000000..ff252931d --- /dev/null +++ b/lambda-bedrock-endusermessaging/personalized_sms_briefing_bedrock/personalized_sms_briefing_bedrock_stack.py @@ -0,0 +1,187 @@ +from aws_cdk import ( + Duration, + Stack, + aws_lambda as _lambda, + aws_events as events, + aws_events_targets as targets, + aws_iam as iam, + aws_logs as logs, + CfnOutput, + aws_secretsmanager as secretsmanager +) +from constructs import Construct +from aws_cdk.aws_lambda_python_alpha import PythonFunction +from personalized_sms_briefing_bedrock import constants +import json + +class PersonalizedSmsBriefingBedrockStack(Stack): + + def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) + + # Create IAM role for Weather Agent Lambda + weather_agent_role = iam.Role( + self, "WeatherAgentRole", + assumed_by=iam.ServicePrincipal("lambda.amazonaws.com"), + managed_policies=[ + iam.ManagedPolicy.from_aws_managed_policy_name("service-role/AWSLambdaBasicExecutionRole") + ] + ) + + # Add Bedrock permissions to Weather Agent + weather_agent_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "bedrock:InvokeModel", + "bedrock:InvokeModelWithResponseStream" + ], + resources=[ + f"arn:aws:bedrock:{self.region}::foundation-model/*" + ] + ) + ) + # Add Secrets Manager permissions for Weather Agent + weather_agent_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "secretsmanager:GetSecretValue" + ], + resources=[ + constants.WEATHER_API_KEY_SECRET_ARN + ] + ) + ) + + # Create Weather Agent Lambda Function + weather_agent_function = PythonFunction( + self, "WeatherAgentFunction", + entry="lambda/weather_agent", # Directory containing your code and requirements.txt + runtime=_lambda.Runtime.PYTHON_3_11, + index="weather_agent.py", # The file containing your handler function + handler="lambda_handler", # The name of your handler function + timeout=Duration.seconds(30), + memory_size=256, + role=weather_agent_role, + environment={ + "WEATHER_API_KEY_SECRET_ARN": constants.WEATHER_API_KEY_SECRET_ARN, + "AWS_BEDROCK_MODEL_ID": constants.AWS_BEDROCK_MODEL_ID, + "LOCATION": constants.LOCATION + }, + log_retention=logs.RetentionDays.ONE_WEEK + ) + + # Create IAM role for SMS Sender Lambda + sms_sender_role = iam.Role( + self, "SmsSenderRole", + assumed_by=iam.ServicePrincipal("lambda.amazonaws.com"), + managed_policies=[ + iam.ManagedPolicy.from_aws_managed_policy_name("service-role/AWSLambdaBasicExecutionRole") + ] + ) + + + # Add SMS permissions + sms_sender_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "sms-voice:SendTextMessage", + "pinpoint:SendMessages" + ], + resources=["*"] + ) + ) + + sms_sender_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "secretsmanager:GetSecretValue" + ], + resources=[ + constants.DESTINATION_PHONE_SECRET_ARN, + constants.ORIGINATION_PHONE_SECRET_ARN + ] + ) + ) + + sms_sender_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "lambda:InvokeFunction" + ], + resources=[weather_agent_function.function_arn] + ) + ) + + # Create SMS Sender Lambda Function + sms_sender_function = _lambda.Function( + self, "SmsSenderFunction", + runtime=_lambda.Runtime.PYTHON_3_11, + handler="personalize_daily_briefing.lambda_handler", + code=_lambda.Code.from_asset("lambda/sms_sender"), + timeout=Duration.seconds(60), + memory_size=256, + role=sms_sender_role, + environment={ + "DESTINATION_PHONE_SECRET_ARN": constants.DESTINATION_PHONE_SECRET_ARN, + "ORIGINATION_PHONE_SECRET_ARN":constants.ORIGINATION_PHONE_SECRET_ARN, + "LOCATION": constants.LOCATION, + "WEATHER_AGENT_FUNCTION_NAME": weather_agent_function.function_name + }, + log_retention=logs.RetentionDays.ONE_WEEK + ) + + # Create EventBridge rule for scheduling + schedule_rule = events.Rule( + self, "DailyBriefingSchedule", + schedule=events.Schedule.cron( + minute=str(constants.SCHEDULE_MINUTE), + hour=str(constants.SCHEDULE_HOUR), + day="*", + month="*", + year="*" + ), + description="Personalized Daily briefing SMS schedule" + ) + + + # Add SMS sender function as target + schedule_rule.add_target( + targets.LambdaFunction(sms_sender_function) + ) + + # Grant EventBridge permission to invoke Lambda + sms_sender_function.add_permission( + "AllowEventBridge", + principal=iam.ServicePrincipal("events.amazonaws.com"), + source_arn=schedule_rule.rule_arn + ) + + # Outputs + CfnOutput( + self, "WeatherAgentFunctionName", + value=weather_agent_function.function_name, + description="Weather Agent Lambda Function Name" + ) + + CfnOutput( + self, "SmsSenderFunctionName", + value=sms_sender_function.function_name, + description="SMS Sender Lambda Function Name" + ) + + CfnOutput( + self, "ScheduleRuleArn", + value=schedule_rule.rule_arn, + description="EventBridge Schedule Rule ARN" + ) + + CfnOutput( + self, "ScheduleExpression", + value=f"cron({constants.SCHEDULE_MINUTE} {constants.SCHEDULE_HOUR} * * ? *)", + description="Schedule Expression (UTC)" + ) diff --git a/lambda-bedrock-endusermessaging/requirements.txt b/lambda-bedrock-endusermessaging/requirements.txt new file mode 100644 index 000000000..b1aa9e191 --- /dev/null +++ b/lambda-bedrock-endusermessaging/requirements.txt @@ -0,0 +1,5 @@ +aws-cdk-lib==2.199.0 +constructs>=10.0.0,<11.0.0 +boto3>=1.36.0 +aws-cdk.aws-lambda-python-alpha==2.199.0a0 + diff --git a/lambda-bedrock-endusermessaging/source.bat b/lambda-bedrock-endusermessaging/source.bat new file mode 100644 index 000000000..9e1a83442 --- /dev/null +++ b/lambda-bedrock-endusermessaging/source.bat @@ -0,0 +1,13 @@ +@echo off + +rem The sole purpose of this script is to make the command +rem +rem source .venv/bin/activate +rem +rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. +rem On Windows, this command just runs this batch file (the argument is ignored). +rem +rem Now we don't need to document a Windows command for activating a virtualenv. + +echo Executing .venv\Scripts\activate.bat for you +.venv\Scripts\activate.bat diff --git a/lambda-bedrock-endusermessaging/src/app.js b/lambda-bedrock-endusermessaging/src/app.js new file mode 100644 index 000000000..cb3c4d9c1 --- /dev/null +++ b/lambda-bedrock-endusermessaging/src/app.js @@ -0,0 +1,10 @@ +/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: MIT-0 + */ + +'use strict' + +exports.handler = async (event) => { + // Lambda handler code + console.log(JSON.stringify(event, 0, null)) +} \ No newline at end of file diff --git a/lambda-bedrock-endusermessaging/template.yaml b/lambda-bedrock-endusermessaging/template.yaml new file mode 100644 index 000000000..269f82e41 --- /dev/null +++ b/lambda-bedrock-endusermessaging/template.yaml @@ -0,0 +1,16 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: AWS::Serverless-2016-10-31 +Description: Serverless patterns - Service to Service description + +# Comment on each global +Globals: + + +# Comment each resource section to explain usage +Resources: + + +# List all common outputs for usage +Outputs: + + diff --git a/lambda-bedrock-endusermessaging/tests/__init__.py b/lambda-bedrock-endusermessaging/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/lambda-bedrock-endusermessaging/tests/unit/__init__.py b/lambda-bedrock-endusermessaging/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/lambda-bedrock-endusermessaging/tests/unit/test_personalized_sms_briefing_bedrock_stack.py b/lambda-bedrock-endusermessaging/tests/unit/test_personalized_sms_briefing_bedrock_stack.py new file mode 100644 index 000000000..d53c97648 --- /dev/null +++ b/lambda-bedrock-endusermessaging/tests/unit/test_personalized_sms_briefing_bedrock_stack.py @@ -0,0 +1,15 @@ +import aws_cdk as core +import aws_cdk.assertions as assertions + +from personalized_sms_briefing_bedrock.personalized_sms_briefing_bedrock_stack import PersonalizedSmsBriefingBedrockStack + +# example tests. To run these tests, uncomment this file along with the example +# resource in personalized_sms_briefing_bedrock/personalized_sms_briefing_bedrock_stack.py +def test_sqs_queue_created(): + app = core.App() + stack = PersonalizedSmsBriefingBedrockStack(app, "personalized-sms-briefing-bedrock") + template = assertions.Template.from_stack(stack) + +# template.has_resource_properties("AWS::SQS::Queue", { +# "VisibilityTimeout": 300 +# }) From 4e7e9ee2d886a40765ade90d5f07bde9100bfa41 Mon Sep 17 00:00:00 2001 From: "Sarath Kumar K.S" Date: Sat, 19 Jul 2025 16:18:25 -0700 Subject: [PATCH 2/3] Initial code for Lambda-EUM --- lambda-endusermessaging/CODE_OF_CONDUCT.md | 4 + lambda-endusermessaging/CONTRIBUTING.md | 59 +++++++ lambda-endusermessaging/README.md | 155 ++++++++++++++++++ lambda-endusermessaging/app.py | 17 ++ lambda-endusermessaging/cdk.json | 94 +++++++++++ lambda-endusermessaging/example-pattern.json | 60 +++++++ .../images/lambda_endusermessaging.png | Bin 0 -> 18454 bytes .../lambda/simple_sms_sender/requirements.txt | 1 + .../lambda/simple_sms_sender/send_sms.py | 56 +++++++ lambda-endusermessaging/requirements.txt | 5 + .../simple_sms_messaging/__init__.py | 0 .../simple_sms_messaging/constants.py | 5 + .../simple_sms_messaging_stack.py | 112 +++++++++++++ lambda-endusermessaging/src/app.js | 10 ++ lambda-endusermessaging/template.yaml | 16 ++ 15 files changed, 594 insertions(+) create mode 100644 lambda-endusermessaging/CODE_OF_CONDUCT.md create mode 100644 lambda-endusermessaging/CONTRIBUTING.md create mode 100644 lambda-endusermessaging/README.md create mode 100644 lambda-endusermessaging/app.py create mode 100644 lambda-endusermessaging/cdk.json create mode 100644 lambda-endusermessaging/example-pattern.json create mode 100644 lambda-endusermessaging/images/lambda_endusermessaging.png create mode 100644 lambda-endusermessaging/lambda/simple_sms_sender/requirements.txt create mode 100644 lambda-endusermessaging/lambda/simple_sms_sender/send_sms.py create mode 100644 lambda-endusermessaging/requirements.txt create mode 100644 lambda-endusermessaging/simple_sms_messaging/__init__.py create mode 100644 lambda-endusermessaging/simple_sms_messaging/constants.py create mode 100644 lambda-endusermessaging/simple_sms_messaging/simple_sms_messaging_stack.py create mode 100644 lambda-endusermessaging/src/app.js create mode 100644 lambda-endusermessaging/template.yaml diff --git a/lambda-endusermessaging/CODE_OF_CONDUCT.md b/lambda-endusermessaging/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..5b627cfa6 --- /dev/null +++ b/lambda-endusermessaging/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/lambda-endusermessaging/CONTRIBUTING.md b/lambda-endusermessaging/CONTRIBUTING.md new file mode 100644 index 000000000..c4b6a1c50 --- /dev/null +++ b/lambda-endusermessaging/CONTRIBUTING.md @@ -0,0 +1,59 @@ +# Contributing Guidelines + +Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional +documentation, we greatly value feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests to ensure we have all the necessary +information to effectively respond to your bug report or contribution. + + +## Reporting Bugs/Feature Requests + +We welcome you to use the GitHub issue tracker to report bugs or suggest features. + +When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already +reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: + +* A reproducible test case or series of steps +* The version of our code being used +* Any modifications you've made relevant to the bug +* Anything unusual about your environment or deployment + + +## Contributing via Pull Requests +Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: + +1. You are working against the latest source on the *main* branch. +2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. +3. You open an issue to discuss any significant work - we would hate for your time to be wasted. + +To send us a pull request, please: + +1. Fork the repository. +2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. +3. Ensure local tests pass. +4. Commit to your fork using clear commit messages. +5. Send us a pull request, answering any default questions in the pull request interface. +6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. + +GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). + + +## Finding contributions to work on +Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. + + +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. + + +## Security issue notifications +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. + + +## Licensing + +See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. diff --git a/lambda-endusermessaging/README.md b/lambda-endusermessaging/README.md new file mode 100644 index 000000000..d36f84a4b --- /dev/null +++ b/lambda-endusermessaging/README.md @@ -0,0 +1,155 @@ +# Amazon Lambda - End User Messaging + +This sample pattern demonstrates how to send scheduled SMS messages using AWS Lambda and AWS End User Messaging. The solution uses EventBridge to trigger a Lambda function at a specified time each day, which then sends an SMS message to a configured phone number. + +Built with a serverless-first approach, this solution automatically sends messages at your preferred time each day. + +**Important:** this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example. + +### Getting Started + +The entire solution is built using AWS Cloud Development Kit (CDK) and AWS Lambda functions running on Python 3.11 runtime. This serverless architecture ensures minimal operational overhead while providing maximum flexibility for customization. + +### Requirements + +* [Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources. +* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured +* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +* [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) installed +* [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com/) installed (required for CDK) +* A destination phone number to receive SMS messages +* An originating number based on your [country's requirements](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) + +### AWS Services Used + +* AWS Lambda +* AWS End User Messaging SMS +* AWS Secret Manager +* Amazon EventBridge + +### Architecture Diagram + +![Lambda End User Messaging Architecture](images/lambda_endusermessaging.png) + +### How it works + +* EventBridge triggers the Lambda function daily at your specified time +* Lambda function performs the following actions: + * Retrieves phone numbers from AWS Secrets Manager + * Uses End User Messaging to send SMS with a predefined message + +### Deployment Instructions + +1. Create a new directory, navigate to that directory in a terminal and clone the GitHub repository: + ``` + git clone https://github.com/aws-samples/serverless-patterns/ + ``` +2. Change directory to the pattern directory: + ``` + cd lambda-endusermessaging + ``` + +3. Create [AWS Secrets Manager Secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) Secrets for your destination phone number and origination phone number. + + Log in to your AWS account and navigate to the AWS Secrets Manager service in the AWS Console in your preferred region. Then select the Store a new secret button. + + For the secret type, select Other type of secret. Under Key/value pair, select the Plaintext tab and enter the phone number. For the encryption key, you can either encrypt using the AWS KMS key that AWS Secrets Manager creates or use a customer-managed AWS KMS key that you create. Select Next, provide the secret name as DestinationPhone, select Next, and click the Store button to create the secret. Note the secret ARN, as this will be needed for the next step. + + Repeat this process for your origination phone number, creating a separate secret named OriginationPhone. + + If you prefer the CLI option, use the commands below. Replace the placeholder values with your actual destination and origination phone numbers, along with your preferred region. + + ``` + aws secretsmanager create-secret \ + --name "OriginationPhone" \ + --description "Origination phone number for SMS sending" \ + --secret-string "+12065550100" \ + --region us-east-1 + + aws secretsmanager create-secret \ + --name "DestinationPhone" \ + --description "Destination phone number for SMS messages" \ + --secret-string "+12065550123" \ + --region us-east-1 + ``` + +4. Edit the constants.py file under the folder simple_sms_messaging and customize the following parameters according to your preferences: + 1. DESTINATION_PHONE_SECRET_ARN: The ARN of the secret containing the phone number where you want to receive SMS messages + 2. ORIGINATION_PHONE_SECRET_ARN: The ARN of the secret containing your verified sender ID for SMS messages + 3. SCHEDULE_HOUR and SCHEDULE_MINUTE: Your desired delivery time (in UTC) + 4. MESSAGE: The message you want to send + + Example below + + ``` + DESTINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:destination-phone-Abc123" + ORIGINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:origination-phone-Def456" + SCHEDULE_HOUR = 15 + SCHEDULE_MINUTE = 0 + MESSAGE = "Hello! This is your daily message from AWS End User Messaging." + ``` + +5. Create a virtualenv on MacOS and Linux + ``` + python3 -m venv .venv + ``` +6. After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv + ``` + source .venv/bin/activate + ``` + [Optional - for Windows] If you are a Windows platform, you would activate the virtualenv with below command + + ``` + .venv\Scripts\activate.bat + ``` +7. Once the virtualenv is activated, you can install the required dependencies + ``` + pip install -r requirements.txt + ``` +8. Synthesize the CloudFormation template for this code + ``` + cdk synth + ``` +9. Deploy the stack + + ``` + cdk deploy + ``` +### Testing Your Deployment + +* For quick verification of your deployment using only the AWS CLI, invoke the SMS sender function to trigger an immediate message: + + ``` + aws lambda invoke \ + --function-name $(aws cloudformation describe-stacks --stack-name SimpleSmSMessagingStack --query "Stacks[0].Outputs[?OutputKey=='SmsSenderFunctionName'].OutputValue" --output text) \ + --payload '{}' \ + --cli-binary-format raw-in-base64-out \ + response.json + + ``` + +* Check the execution status for detailed logs and any error messages. You should also have received an SMS on the destination phone number. + + ``` + cat response.json + ``` + +### Cleanup + +1. To cleanup/delete resources created while deploying the solution, go to the root folder of the project repository and run + ``` + cdk destroy + ``` + +### Useful commands + + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +------ +Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: MIT-0 \ No newline at end of file diff --git a/lambda-endusermessaging/app.py b/lambda-endusermessaging/app.py new file mode 100644 index 000000000..bbc403326 --- /dev/null +++ b/lambda-endusermessaging/app.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +import os +import aws_cdk as cdk +from simple_sms_messaging.simple_sms_messaging_stack import SimpleSmSMessagingStack + +app = cdk.App() + +SimpleSmSMessagingStack( + app, + "SimpleSmSMessagingStack", + env=cdk.Environment( + account=os.getenv('CDK_DEFAULT_ACCOUNT'), + region=os.getenv('CDK_DEFAULT_REGION') + ) +) + +app.synth() \ No newline at end of file diff --git a/lambda-endusermessaging/cdk.json b/lambda-endusermessaging/cdk.json new file mode 100644 index 000000000..0216f6516 --- /dev/null +++ b/lambda-endusermessaging/cdk.json @@ -0,0 +1,94 @@ +{ + "app": "python3 app.py", + "watch": { + "include": [ + "**" + ], + "exclude": [ + "README.md", + "cdk*.json", + "requirements*.txt", + "source.bat", + "**/__init__.py", + "**/__pycache__", + "tests" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true, + "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, + "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, + "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, + "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true, + "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true, + "@aws-cdk/aws-eks:nodegroupNameAttribute": true, + "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true, + "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true, + "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false, + "@aws-cdk/aws-s3:keepNotificationInImportedBucket": false, + "@aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature": false, + "@aws-cdk/aws-ecs:disableEcsImdsBlocking": true, + "@aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions": true, + "@aws-cdk/aws-dynamodb:resourcePolicyPerReplica": true, + "@aws-cdk/aws-ec2:ec2SumTImeoutEnabled": true, + "@aws-cdk/aws-appsync:appSyncGraphQLAPIScopeLambdaPermission": true, + "@aws-cdk/aws-rds:setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId": true, + "@aws-cdk/core:cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics": true, + "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": true, + "@aws-cdk/aws-stepfunctions-tasks:fixRunEcsTaskPolicy": true, + "@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault": true, + "@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": true, + "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": true, + "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": true, + "@aws-cdk/core:enableAdditionalMetadataCollection": true, + "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": false, + "@aws-cdk/aws-s3:setUniqueReplicationRoleName": true, + "@aws-cdk/aws-events:requireEventBusPolicySid": true, + "@aws-cdk/core:aspectPrioritiesMutating": true, + "@aws-cdk/aws-dynamodb:retainTableReplica": true, + "@aws-cdk/aws-stepfunctions:useDistributedMapResultWriterV2": true, + "@aws-cdk/s3-notifications:addS3TrustKeyPolicyForSnsSubscriptions": true, + "@aws-cdk/aws-ec2:requirePrivateSubnetsForEgressOnlyInternetGateway": true, + "@aws-cdk/aws-s3:publicAccessBlockedByDefault": true + } +} diff --git a/lambda-endusermessaging/example-pattern.json b/lambda-endusermessaging/example-pattern.json new file mode 100644 index 000000000..94b454028 --- /dev/null +++ b/lambda-endusermessaging/example-pattern.json @@ -0,0 +1,60 @@ +{ + "title": "Lambda - End User Messaging", + "description": "Scheduled SMS messaging using AWS Lambda and End User Messaging", + "language": "Python", + "level": "300", + "framework": "CDK", + "introBox": { + "headline": "How it works", + "text": [ + "This pattern demonstrates how to send scheduled SMS messages using AWS Lambda and AWS End User Messaging with a serverless architecture." + ] + }, + "gitHub": { + "template": { + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-endusermessaging", + "templateURL": "serverless-patterns/lambda-endusermessaging", + "projectFolder": "lambda-endusermessaging", + "templateFile": "simple_sms_messaging/simple_sms_messaging_stack.py" + } + }, + "resources": { + "bullets": [ + { + "text": "AWS Lambda", + "link": "https://aws.amazon.com/lambda/" + }, + { + "text": "AWS End User Messaging", + "link": "https://aws.amazon.com/end-user-messaging/" + }, + { + "text": "Amazon EventBridge", + "link": "https://aws.amazon.com/eventbridge/" + } + ] + }, + "deploy": { + "text": [ + "Deploy the stack:cdk deploy." + ] + }, + "testing": { + "text": [ + "See the GitHub repo for detailed testing instructions." + ] + }, + "cleanup": { + "text": [ + "Delete the stack: cdk delete." + ] + }, + "authors": [ + { + "name": "Sarath Kumar K.S", + "image": "https://i.postimg.cc/6qpwHbWD/IMG-0258.jpg", + "bio": "Sarath is a Senior Technical Account Manager at AWS.", + "linkedin": "kssarathkumar" + } + ] +} diff --git a/lambda-endusermessaging/images/lambda_endusermessaging.png b/lambda-endusermessaging/images/lambda_endusermessaging.png new file mode 100644 index 0000000000000000000000000000000000000000..b004fcab920a9ab838c3ea0059b5109fbb40085f GIT binary patch literal 18454 zcmd3O_gj-u(`M)$1f=(_0@8#~LQxb11f+vVLXY$+B-GGFs#Iw~MMQcNkluTVO79>g zKq#Si*!X_$Uc37rY<@_)uII^|GjnF{xo0NPFLl(Z$XUq&005Q7^QZa%06q%$-j0+Q z_gv*j&4_!!^U_y;0w^0{-vj`-0UA#q8^XXlIYb`~)oXiW>e}s@or!&;Nb!g%c*ykr zRx0N4{>=1dTMeSnY_QU}6@i0+=C0R2aD_5{dfoZSks9`tY?(O6e;@m1Cl#4% z`}`RICFFJ`Oz?#1eh0H@!}AZkN7MO=nt@kn+n=bfHuz>s+aIl&-*~o37>7$lik2`V z1Y0*7e&|NGqv9vY;$(@FCe?)2P;+#FB=3fjuXkFd{^ z!~0b)XF<>URSuNl@}9fY4$|oI;~>msBtwh zcf~{Nxjp`?CBt6xjzed{$nJ$CrNQB_dc{9XL%MAWnhyjThGMgV&?`VtfynxwLjhuFc+qBchN31tNXWKV$2NZ?HWFOK; zBH%QzBm?=}YO1`egS*@Yf$vWJm)j|5V-TY8nJKNE^!r$v<-~883f;m4WlBxpXP*n(kc;6mGOY(g6=c;FAAt7pT0ielhoYH* zM1&}%xH&*{bX#@6jR>1=ZiLpt45tH4F2ze-G9LroIhd5(+eecHl%Z%#8qS1LpkEHK z6#PaQ55cy_bji6PA-)}zN_0AEsS>t`k#PNS?8G;Q%t8D*vQk3o%M>T)bv z!Qmj(<4qDF*Nu&eRL>blqEo+3T}HzEtd|Ob6^O03wG_$Xei191w79#y$;d`5kVwJk zXd}^mD-X}7VuE6N!%lp-VJBmY_oQsL$NK)-l4w(WRepkmYL5z7RIUKM4YTEqw+u{^ zSts~QpJKDU=bK+L7%xv#>l?X=-<3HeEv_nIU6YA7OJ&e~IVqtOh3@3o=pyA<`TXKs z3^^*QxrXl;lFSD{-84y@Wo4RFFOI2{WGWwUqbGA9RS@5$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N4nNnhM#N#LSEa&oLeuSiv(Ecs#PhB!LM7I|#&~;3ne+U}C_;0y&7&vV&*5 z8405q%L1MeY>%)F$ii*~AdkN#JX`6Hms{}CBPFsxVOl`Kv)S0hMiG4)109PvUZBE6 zg2@q{0(j)Sc%IG19>T4x#uhwpn8?lQw>z`6Fzrco`)2_)=GkoBfM*Qh5@zrW&u6)E z<#>Mu1Y==@N7M|S;i+oSpaFNrVDZLA5eelm$77Mk0*}vF@bMxn0285i09&j<7$+DD z0By|w*kt+v&yZmSCx}J0f(^h0Kn6}J=#Q}qsKQ3oYD~eNShrvYfR8-cz$-k%TW%-E zzaB!8U;%mlFy=`>pnMk$9$dsAhgsKtb#tFwwvpfE@w60Z4#$ zOoRY!`8G1*nUU1ag53!wN#sSsqK-}l?*KtAHi|I~+!K za#Fk3CVuPigha-`%dlBhYm5hQ3u5ZMe48Nn2lC_@&Q_K{{aAN!Bpx=n#)N*2v5L(c z#+aG_#u&eFXgcX;Cr8S}OMBSpVy#oZiv&+@0N2nlmSiRePq6_1@czq5zOuG8Va^t8h zS-=kqAU+>2Us=WPd#S@}?3s-%Dc8^Xz357Llivb}zeLCeVjYbOv9WdNo5-VnZLZ7% z4>tNC9_1Rx0m3H$4tN47y?*hqoE4ndK>`+UzzW8%n#{%&fEzEoV*>)`4iX!m;y~j|8O$ z!Yt+|o_dgMvH)3tEI<|@3+P$^9zBGwV51<9_roJ`yy)xYXh^^0=(dB(kp;Y102@Xe oJ&AV#3L@d_)8RQsc(P3Y4^Y7SM@y3q+yDRo07*qoM6N<$g5#vC#sB~S literal 0 HcmV?d00001 diff --git a/lambda-endusermessaging/lambda/simple_sms_sender/requirements.txt b/lambda-endusermessaging/lambda/simple_sms_sender/requirements.txt new file mode 100644 index 000000000..2cf4eaba5 --- /dev/null +++ b/lambda-endusermessaging/lambda/simple_sms_sender/requirements.txt @@ -0,0 +1 @@ +boto3>=1.28.0 \ No newline at end of file diff --git a/lambda-endusermessaging/lambda/simple_sms_sender/send_sms.py b/lambda-endusermessaging/lambda/simple_sms_sender/send_sms.py new file mode 100644 index 000000000..dcce43f22 --- /dev/null +++ b/lambda-endusermessaging/lambda/simple_sms_sender/send_sms.py @@ -0,0 +1,56 @@ +import json +import os +import boto3 +from datetime import datetime + +def get_secret_value(secret_arn): + """Retrieve a secret value from AWS Secrets Manager""" + client = boto3.client('secretsmanager') + response = client.get_secret_value(SecretId=secret_arn) + return response['SecretString'] + +def send_sms(phone_number: str, originating_number: str, message: str): + """Send SMS using AWS End User Messaging""" + sms_client = boto3.client('pinpoint-sms-voice-v2') + + response = sms_client.send_text_message( + DestinationPhoneNumber=phone_number, + OriginationIdentity=originating_number, + MessageBody=message + ) + + return response + +def lambda_handler(event, context): + """Main Lambda handler for sending SMS messages""" + + # Get configuration from environment variables + message = os.environ['MESSAGE'] + phone_number = get_secret_value(os.environ['DESTINATION_PHONE_SECRET_ARN']) + originating_number = get_secret_value(os.environ['ORIGINATION_PHONE_SECRET_ARN']) + + try: + # Send SMS + sms_response = send_sms(phone_number, originating_number, message) + + print(f"SMS sent successfully: {message}") + print(f"SMS Message ID: {sms_response.get('MessageId')}") + + return { + 'statusCode': 200, + 'body': json.dumps({ + 'message': 'SMS message sent successfully!', + 'sms_message_id': sms_response.get('MessageId'), + 'timestamp': datetime.now().isoformat() + }) + } + + except Exception as e: + return { + 'statusCode': 500, + 'body': json.dumps({ + 'error': 'Failed to send SMS message', + 'details': str(e), + 'timestamp': datetime.now().isoformat() + }) + } \ No newline at end of file diff --git a/lambda-endusermessaging/requirements.txt b/lambda-endusermessaging/requirements.txt new file mode 100644 index 000000000..b1aa9e191 --- /dev/null +++ b/lambda-endusermessaging/requirements.txt @@ -0,0 +1,5 @@ +aws-cdk-lib==2.199.0 +constructs>=10.0.0,<11.0.0 +boto3>=1.36.0 +aws-cdk.aws-lambda-python-alpha==2.199.0a0 + diff --git a/lambda-endusermessaging/simple_sms_messaging/__init__.py b/lambda-endusermessaging/simple_sms_messaging/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/lambda-endusermessaging/simple_sms_messaging/constants.py b/lambda-endusermessaging/simple_sms_messaging/constants.py new file mode 100644 index 000000000..4c9b1ae05 --- /dev/null +++ b/lambda-endusermessaging/simple_sms_messaging/constants.py @@ -0,0 +1,5 @@ +DESTINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:destination-phone-Abc123" +ORIGINATION_PHONE_SECRET_ARN = "arn:aws:secretsmanager:us-west-2:123456789012:secret:origination-phone-Def456" +SCHEDULE_HOUR = 15 +SCHEDULE_MINUTE = 0 +MESSAGE = "Hello! This is your daily message from AWS End User Messaging." \ No newline at end of file diff --git a/lambda-endusermessaging/simple_sms_messaging/simple_sms_messaging_stack.py b/lambda-endusermessaging/simple_sms_messaging/simple_sms_messaging_stack.py new file mode 100644 index 000000000..761c17078 --- /dev/null +++ b/lambda-endusermessaging/simple_sms_messaging/simple_sms_messaging_stack.py @@ -0,0 +1,112 @@ +from aws_cdk import ( + Duration, + Stack, + aws_lambda as _lambda, + aws_events as events, + aws_events_targets as targets, + aws_iam as iam, + aws_logs as logs, + CfnOutput, +) +from constructs import Construct +from simple_sms_messaging import constants + +class SimpleSmSMessagingStack(Stack): + + def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) + + # Create IAM role for SMS Sender Lambda + sms_sender_role = iam.Role( + self, "SmsSenderRole", + assumed_by=iam.ServicePrincipal("lambda.amazonaws.com"), + managed_policies=[ + iam.ManagedPolicy.from_aws_managed_policy_name("service-role/AWSLambdaBasicExecutionRole") + ] + ) + + # Add SMS permissions + sms_sender_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "sms-voice:SendTextMessage", + ], + resources=["*"] + ) + ) + + # Add Secrets Manager permissions + sms_sender_role.add_to_policy( + iam.PolicyStatement( + effect=iam.Effect.ALLOW, + actions=[ + "secretsmanager:GetSecretValue" + ], + resources=[ + constants.DESTINATION_PHONE_SECRET_ARN, + constants.ORIGINATION_PHONE_SECRET_ARN + ] + ) + ) + + # Create SMS Sender Lambda Function + sms_sender_function = _lambda.Function( + self, "SmsSenderFunction", + runtime=_lambda.Runtime.PYTHON_3_11, + handler="send_sms.lambda_handler", + code=_lambda.Code.from_asset("lambda/simple_sms_sender"), + timeout=Duration.seconds(30), + memory_size=128, + role=sms_sender_role, + environment={ + "DESTINATION_PHONE_SECRET_ARN": constants.DESTINATION_PHONE_SECRET_ARN, + "ORIGINATION_PHONE_SECRET_ARN": constants.ORIGINATION_PHONE_SECRET_ARN, + "MESSAGE": constants.MESSAGE + }, + log_retention=logs.RetentionDays.ONE_WEEK + ) + + # Create EventBridge rule for scheduling + schedule_rule = events.Rule( + self, "DailyMessageSchedule", + schedule=events.Schedule.cron( + minute=str(constants.SCHEDULE_MINUTE), + hour=str(constants.SCHEDULE_HOUR), + day="*", + month="*", + year="*" + ), + description="Simple daily SMS message schedule" + ) + + # Add SMS sender function as target + schedule_rule.add_target( + targets.LambdaFunction(sms_sender_function) + ) + + # Grant EventBridge permission to invoke Lambda + sms_sender_function.add_permission( + "AllowEventBridge", + principal=iam.ServicePrincipal("events.amazonaws.com"), + source_arn=schedule_rule.rule_arn + ) + + # Outputs + CfnOutput( + self, "SmsSenderFunctionName", + value=sms_sender_function.function_name, + description="SMS Sender Lambda Function Name" + ) + + CfnOutput( + self, "ScheduleRuleArn", + value=schedule_rule.rule_arn, + description="EventBridge Schedule Rule ARN" + ) + + CfnOutput( + self, "ScheduleExpression", + value=f"cron({constants.SCHEDULE_MINUTE} {constants.SCHEDULE_HOUR} * * ? *)", + description="Schedule Expression (UTC)" + ) \ No newline at end of file diff --git a/lambda-endusermessaging/src/app.js b/lambda-endusermessaging/src/app.js new file mode 100644 index 000000000..cb3c4d9c1 --- /dev/null +++ b/lambda-endusermessaging/src/app.js @@ -0,0 +1,10 @@ +/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: MIT-0 + */ + +'use strict' + +exports.handler = async (event) => { + // Lambda handler code + console.log(JSON.stringify(event, 0, null)) +} \ No newline at end of file diff --git a/lambda-endusermessaging/template.yaml b/lambda-endusermessaging/template.yaml new file mode 100644 index 000000000..269f82e41 --- /dev/null +++ b/lambda-endusermessaging/template.yaml @@ -0,0 +1,16 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: AWS::Serverless-2016-10-31 +Description: Serverless patterns - Service to Service description + +# Comment on each global +Globals: + + +# Comment each resource section to explain usage +Resources: + + +# List all common outputs for usage +Outputs: + + From 26a0f98cf5c192bb42b492028530f18202e36ace Mon Sep 17 00:00:00 2001 From: "Sarath Kumar K.S" Date: Sat, 19 Jul 2025 16:21:10 -0700 Subject: [PATCH 3/3] Initial code for Lambda-EUM --- lambda-endusermessaging/template.yaml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 lambda-endusermessaging/template.yaml diff --git a/lambda-endusermessaging/template.yaml b/lambda-endusermessaging/template.yaml deleted file mode 100644 index 269f82e41..000000000 --- a/lambda-endusermessaging/template.yaml +++ /dev/null @@ -1,16 +0,0 @@ -AWSTemplateFormatVersion: '2010-09-09' -Transform: AWS::Serverless-2016-10-31 -Description: Serverless patterns - Service to Service description - -# Comment on each global -Globals: - - -# Comment each resource section to explain usage -Resources: - - -# List all common outputs for usage -Outputs: - -