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
+
+
+### 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 000000000..2c5bb5656
Binary files /dev/null and b/lambda-bedrock-endusermessaging/images/personalized_sms_briefing_architecture.jpg differ
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
+# })
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
+
+
+
+### 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 000000000..b004fcab9
Binary files /dev/null and b/lambda-endusermessaging/images/lambda_endusermessaging.png differ
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