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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠