Is AppConfig extension association is broken?

1

Hello.

I wanted to create a simple lambda that will be triggered each time someone is doing deployment for AWS Appconfig profile inside the specific application and only trigger when deployment is completed. So it will run only for envs and profiles connected to that AWS AppConfig application.

I did try to do that:

Resources:
  MyLambda:
    Condition: isAppConfigRegion
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: src
      DeploymentPreference:
        Type: AllAtOnce
        Role: !GetAtt 'CodeDeployRole.Arn'
      Handler: my_app.handler
      Role: !GetAtt 'MyLambdaRole.Arn'

  AppConfigApplication:
    Type: AWS::AppConfig::Application
    Condition: isAppConfigRegion
    DeletionPolicy: Retain
    UpdateReplacePolicy: Retain
    Properties:
      Name: !Ref AppConfigApplicationName

  AppConfigOnDeployExtension:
    Condition: isAppConfigRegion
    Type: AWS::AppConfig::Extension
    Properties:
      Name: !Sub "${Name} On Deploy"
      Actions:
        ON_DEPLOYMENT_COMPLETE:
          - Name: OnDeploymentComplete
            Uri: !GetAtt MyLambda.Arn
            RoleArn: !GetAtt MyLambda.Arn

  AppConfigExtensionAssociation:
    Condition: isAppConfigRegion
    Type: AWS::AppConfig::ExtensionAssociation
    Properties:
      ExtensionIdentifier: !Ref AppConfigOnDeployExtension
      ResourceIdentifier: !Sub
        - "arn:aws:appconfig:${AWS::Region}:${AWS::AccountId}:application/${APPLICATION}"
        - APPLICATION: !Ref AppConfigApplication

and it looked like its working, but:

  1. any application which deploys configuration profiles will trigger the extension, even ones that aren't connected to it with AppConfigExtensionAssociation
  2. logs from his profile attempts spawn inside log handler connected to my MyLambda, also any log connected to any profile deployment start showing in my logs and trigger my lambda

Is it something wrong with my template.yaml or this is something broken with this extension?

Rogal
已提问 8 个月前126 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容