Skip to content

Commit

Permalink
updated template for unauth geofences
Browse files Browse the repository at this point in the history
  • Loading branch information
its-aazizi committed Sep 30, 2024
1 parent cec9437 commit 5000cdc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions extra/cloudformation/default-unauth-resources-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,36 @@ Resources:
Properties:
ServiceToken: !GetAtt AmazonLocationGeoFenceLambda.Arn

GeofenceLambdaTrigger:
Type: AWS::Events::Rule
DependsOn: AmazonLocationGeoFenceLambda
Properties:
Name: GeofenceLambdaTrigger
EventPattern:
Fn::Sub: >-
{"source":["aws.cloudformation"],"region":["${AWS::Region}"],"detail-type":["CloudFormation
Stack Status
Change"],"detail":{"stack-id":["${AWS::StackId}"],"status-details":{"status":["UPDATE_IN_PROGRESS"]}}}
State: ENABLED
Targets:
- Id: Id1acddeab-175e-495f-8b56-8d8de684f610
Arn:
Fn::Sub: >-
arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:AmazonLocationDemoGeofenceCreator
Input: |-
{
"RequestType": "Update"
}
GeofenceTriggerInvokePermission:
Type: AWS::Lambda::Permission
DependsOn: [AmazonLocationGeoFenceLambda, GeofenceLambdaTrigger]
Properties:
Action: lambda:InvokeFunction
FunctionName: AmazonLocationDemoGeofenceCreator
Principal: events.amazonaws.com
SourceArn: !GetAtt [GeofenceLambdaTrigger, Arn]

AmazonLocationGeoFenceLambda:
DependsOn: AmazonLocationGeoFenceLambdaExecutionPolicy
Type: AWS::Lambda::Function
Expand Down

0 comments on commit 5000cdc

Please sign in to comment.