Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions copilot/flowise/addons/flowise-secrets-manager-access-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: Your workload's name.

Resources:
FlowiseSecretsManagerAccessPolicy:
Type: AWS::IAM::ManagedPolicy
Metadata:
'aws:copilot:description': 'Allow Flowise task role to read FlowiseEncryptionKey from Secrets Manager'
Properties:
Description: 'Read-only access for Flowise to retrieve the FlowiseEncryptionKey secret'
PolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: ReadFlowiseEncryptionKey
Effect: Allow
Action:
- secretsmanager:GetSecretValue
- secretsmanager:CreateSecret
- secretsmanager:DescribeSecret
Resource:
- !Sub 'arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:FlowiseEncryptionKey-*'
# If you use a customer-managed KMS key for the secret, also allow kms:Decrypt:
# - Sid: DecryptWithCMK
# Effect: Allow
# Action: kms:Decrypt
# Resource: arn:aws:kms:<region>:<account>:key/<your-key-id>

Outputs:
FlowiseSecretsManagerAccessPolicyArn:
Description: 'Managed policy to attach to the task role for Secrets Manager access'
Value: !Ref FlowiseSecretsManagerAccessPolicy
Loading