Skip to content

AWS::Config::ConformancePack TemplateS3Uri file download check when using CfCT?

0

Hi all

I'm deploying a custom AWS Config conformance pack using Customizations for Control Tower (CfCT). But I'm not sure if the CfCT is downloading the updated yaml cfn file I specified in the "TemplateS3Uri" parameter each time I run the CfCT pipeline. Since looking at the error message, I suspect it's downloading the updated yaml file.

Where can I check it when the Custom-Control-Tower-CodePipeline runs? My template file is as follows:

Parameters:
  ConformancePackName: 
    Type: String
    Default: "FedRAMP-Moderate-cfct"
    Description: AWS Config Conformance Pack for FedRAMP (Moderate) name
  DeliveryS3Bucket: 
    Type: String
    Default: "aws-config-conformance-pack-template-xyz"
    Description: S3 bucket name where AWS Config Conformance Pack for FedRAMP (Moderate) definition file is
  TemplateS3Uri:
    Type: String
    Default: "s3://aws-config-conformance-pack-template/Operational-Best-Practices-for-FedRAMP_Gov_Moderate_xyz.yaml"
    Description: S3 uri for the AWS Config Conformance Pack definition file

Resources:
  FedRAMPConformancePack:
    Type: AWS::Config::ConformancePack
    Properties:
      ConformancePackName: !Ref ConformancePackName
      DeliveryS3Bucket: !Ref DeliveryS3Bucket
      TemplateS3Uri: !Ref TemplateS3Uri

asked 2 years ago202 views

1 Answer
0
Accepted Answer

When using Customizations for Control Tower (CfCT) to deploy a custom AWS Config conformance pack, the pipeline should download the updated YAML file specified in the "TemplateS3Uri" parameter each time the pipeline runs. This is because CloudFormation, which CfCT uses, typically retrieves the latest version of the template from the specified S3 location during stack creation or update.

To verify if the updated YAML file is being downloaded when the Custom-Control-Tower-CodePipeline runs, you can check a few places:

  1. CloudFormation Stack Events: Look at the stack events for your conformance pack in the CloudFormation console. You should see events related to the creation or update of the AWS::Config::ConformancePack resource, which would indicate that the template is being processed.

  2. CodePipeline Execution Details: In the AWS CodePipeline console, examine the details of the pipeline execution. Look for steps that involve retrieving or processing the template file.

  3. CloudWatch Logs: If you have enabled logging for your pipeline, check the CloudWatch Logs for any entries related to downloading or processing the template file.

  4. S3 Access Logs: If you have enabled access logging on your S3 bucket, you can check these logs to see if there are GET requests for your template file during pipeline execution.

  5. Config Conformance Pack: In the AWS Config console, look at the details of your conformance pack. If the template has been updated and successfully applied, you should see the changes reflected in the conformance pack's configuration.

If you're still unsure, you could add a unique identifier or version number as a comment in your YAML file and update it with each change. This way, when you check the deployed conformance pack's details, you can verify if the latest version is being used.

Remember that issues like insufficient S3 bucket permissions could prevent the template from being downloaded. Ensure that your S3 bucket policy allows the necessary access for AWS Config and the roles used by CfCT and CodePipeline.
Sources
Control Tower CfCT ""Insufficient read permissions on S3" error? | AWS re:Post
Editing Conformance Packs for AWS Config - AWS Config

answered 2 years ago

EXPERT

reviewed 2 years ago

    1. S3 Access Logs makes sense. I don't think I could see the "evidence" from others.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.