You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just been doing some reading of the AWS docs and it looks like this isn't a problem if your lambdas are in the supported regions
Q: What regions is AWS Lambda available in?
AWS Lambda is currently available in US East (N. Virginia), US West (Oregon) and EU (Ireland). Q: Do my AWS Lambda functions need to be in the same region as my Amazon SNS usage?
You can subscribe your AWS Lambda functions to an Amazon SNS topic in any region.
I've tested this out on a lambda running in eu-west-1 and it works great.
To make this work with the script under the text "These commands subscribe an AWS Lambda function to the Unreliable Town Clock:" I've modified it slightly so anyone who's got lambdas in us-east-2 and eu-west-1 can subscribe to your topic
# AWS Lambda function
lambda_function_name=mylambda
lambda_function_region="eu-west-1"
account=000000000000
lambda_function_arn="arn:aws:lambda:$lambda_function_region:$account:function:$lambda_function_name"
# Unreliable Town Clock public SNS Topic
sns_topic_arn="arn:aws:sns:us-east-1:522480313337:unreliable-town-clock-topic-178F1OQACHTYF"
# Allow the SNS Topic to invoke the AWS Lambda function
aws lambda add-permission \
--function-name "$lambda_function_name" \
--action lambda:InvokeFunction \
--principal sns.amazonaws.com \
--source-arn "$sns_topic_arn" \
--statement-id $(uuidgen)
# Subscribe the AWS Lambda function to the SNS Topic in us-east-1
aws --region "us-east-1" sns subscribe \
--topic-arn "$sns_topic_arn" \
--protocol lambda \
--notification-endpoint "$lambda_function_arn"
The text was updated successfully, but these errors were encountered:
Hi @alestic
Sorry if this is the wrong place to post this.
In your blog post https://alestic.com/2015/05/aws-lambda-recurring-schedule/, it says the UTC is only available in
us-east-1
.I've just been doing some reading of the AWS docs and it looks like this isn't a problem if your lambdas are in the supported regions
I've tested this out on a lambda running in
eu-west-1
and it works great.To make this work with the script under the text "These commands subscribe an AWS Lambda function to the Unreliable Town Clock:" I've modified it slightly so anyone who's got lambdas in
us-east-2
andeu-west-1
can subscribe to your topicThe text was updated successfully, but these errors were encountered: