Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2023-11-02 07:55:41 +00:00
name: s3-writer
runtime: yaml
description: A program to create an EventBridge Scheduler in AWS.
resources:
stack-ref:
type: pulumi:pulumi:StackReference
properties:
name: my-org/my-first-program/dev
scheduler-role:
type: aws:iam:Role
properties:
assumeRolePolicy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "scheduler.amazonaws.com"
},
"Effect": "Allow"
}
]
}
inlinePolicies:
- name: "my-inline-policy"
policy:
fn::toJSON:
Version: 2012-10-17
Statement:
- Action:
- lambda:*
Effect: Allow
Resource: "*"
scheduler:
type: aws:scheduler:Schedule
properties:
flexibleTimeWindow:
mode: OFF
scheduleExpression: rate(1 minutes)
target:
arn: ${stack-ref.outputs["lambdaArn"]}
roleArn: ${scheduler-role.arn}