lib/jets/application.rb in jets-1.9.15 vs lib/jets/application.rb in jets-1.9.16
- old
+ new
@@ -185,11 +185,10 @@
end
def set_iam_policy
config.iam_policy ||= self.class.default_iam_policy
config.managed_policy_definitions ||= [] # default empty
- config.prewarm_job_iam_policy ||= self.class.default_prewarm_job_iam_policy
end
def self.default_iam_policy
project_namespace = Jets.project_namespace
logs = {
@@ -217,26 +216,9 @@
resource: "arn:aws:cloudformation:#{Jets.aws.region}:#{Jets.aws.account}:stack/#{project_namespace}*",
}
policies << cloudformation
end
policies
- end
-
- def self.default_prewarm_job_iam_policy
- [
- {
- sid: "Statement1",
- action: ["logs:*"],
- effect: "Allow",
- resource: "arn:aws:logs:#{Jets.aws.region}:#{Jets.aws.account}:log-group:#{Jets.config.project_namespace}-*",
- },
- {
- sid: "Statement2",
- action: ["lambda:InvokeFunction", "lambda:InvokeAsync"],
- effect: "Allow",
- resource: "arn:aws:lambda:#{Jets.aws.region}:#{Jets.aws.account}:function:#{Jets.config.project_namespace}-*",
- }
- ]
end
# It is pretty easy to attempt to set environment variables without
# the correct AWS Environment.Variables path struture.
# Auto-fix it for convenience.