aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[Resource Type] - [BUG] - CloudFormation fails to rollback AWS::Pinpoint::Campaign resource when previous StartTime configuration is in the past

Open
#2,139 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::Pinpoint::Campaign

### Resource Name

_No response_

### Issue Description

There seems to be a bug in how AWS CloudFormation handles rollbacks of AWS::Pinpoint::Campaign resources. During the rollback process of a CloudFormation stack containing an AWS::Pinpoint::Campaign resource, CloudFormation attempts to restore the previous configuration of the Amazon Pinpoint campaign. However, if the previous configuration had a StartTime property set to a time in the past, the rollback fails with the error "StartTime must be at least current time".

### Expected Behavior

During the rollback process, CloudFormation should handle the restoration of AWS::Pinpoint::Campaign resources in a way that does not violate the validation rules for the StartTime property.

### Observed Behavior

During the rollback process, CloudFormation attempts to restore the AWS::Pinpoint::Campaign resource to its previous configuration, including the StartTime property set to the time specified in the initial configuration. If the StartTime is now in the past relative to the current time, Amazon Pinpoint rejects the request to update the campaign with the following error:

StartTime must be at least current time. (Service: AmazonPinpoint; Status Code: 400; Error Code: BadRequestException)

This causes the entire rollback process to fail, leaving the stack in an inconsistent state.

### Test Cases

Steps to Reproduce:
1. Create a CloudFormation stack with an AWS::Pinpoint::Campaign resource, where the StartTime property is set to a future date or time.
2. Update the CloudFormation stack, making changes to the AWS::Pinpoint::Campaign resource or other resources in the stack.
3. If the stack update fails, CloudFormation initiates a rollback process.
4. During the rollback process, CloudFormation attempts to restore the previous configuration of the AWS::Pinpoint::Campaign resource, including the StartTime property set to the future date or time specified in the initial configuration.
5. Since the StartTime is now in the past relative to the current time, Amazon Pinpoint rejects the request to update the campaign, causing the rollback to fail with the error "StartTime must be at least current time".

### Other Details

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.