AWS CloudFormation
57 questions
A developer deployed an Amazon EC2 instance and an associated security group using an AWS CloudFormation stack. During a troubleshooting session, the developer manually added a new ingress rule to the security group using the AWS Management Console. The developer now wants to synchronize the CloudFormation stack with these changes to ensure future stack updates do not overwrite or fail due to this modification. Which action should the developer take to resolve this discrepancy?
A developer is using AWS CloudFormation to deploy a web application. The template requires a database password that must be retrieved securely without being hardcoded or exposed in plaintext. During the deployment testing phase, the developer also needs to ensure that if any resource fails to create or update, the stack does not automatically revert its changes, allowing the developer to investigate the failed resource state.
Which two actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
A developer is maintaining an application stack deployed via AWS CloudFormation. A recent stack update failed because a Security Group managed by the stack was manually deleted via the Amazon EC2 console, causing the stack rollback to fail. The stack is currently stuck in the UPDATE_ROLLBACK_FAILED state. The developer needs to return the stack to a stable state so they can apply a new template. Which two actions must the developer perform to resolve this issue? (Select TWO.)
Select all that apply
A developer is writing an AWS CloudFormation template to deploy an application on Amazon EC2. The application requires two configurations: a database connection password that is sensitive and must be rotated automatically every 30 days, and an environment-specific application logging level (e.g., DEBUG or INFO) that is non-sensitive and updated frequently. Which configuration strategy should the developer implement in the template to meet these requirements securely and cost-effectively?
A developer is managing an AWS CloudFormation stack for a web application. The application requires a database password that must be rotated automatically every 30 days. During a stack update to modify the application configuration, a database connection error causes the update to fail, leaving the stack stuck in the UPDATE_ROLLBACK_FAILED state. Which combination of actions should the developer take to securely retrieve the database password in the template and resolve the failed stack update?
A developer is deploying a multi-tier application using an AWS CloudFormation template. The template defines an Amazon RDS DBInstance that contains critical production data. To ensure data safety and prevent downtime, the developer must meet two requirements:
1. Prevent the database instance from being deleted when the CloudFormation stack is deleted.
2. Prevent the database instance from being accidentally updated or replaced during stack updates, while still allowing other stack resources to be updated.
Which combination of actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
A development team uses AWS CloudFormation to manage a serverless application consisting of Amazon DynamoDB tables and AWS Lambda functions. The application requires a database API key that must be rotated every 30 days. Additionally, a developer recently modified the read capacity units of one of the DynamoDB tables directly in the AWS Management Console to handle a temporary traffic spike. The team now needs to perform a stack update to deploy new application logic while addressing both the rotation requirement and the manual configuration changes.
Which of the following actions should the team take to meet these requirements? (Select TWO.)
Select all that apply
A developer uses AWS CloudFormation to manage an application's infrastructure. An administrator manually modified the inbound rules of a security group associated with an Amazon EC2 instance using the AWS Management Console to resolve a temporary connection issue. The developer runs a drift detection status check on the stack, and the security group is flagged as DRIFTED. Which action should the developer take to resolve the drift and ensure the resource configuration is correctly aligned with the CloudFormation template?
A developer is writing an AWS CloudFormation template to deploy a web application on an Amazon EC2 instance. The application requires a database password that needs automatic rotation, as well as several software packages. The developer wants to ensure that any updates to the software configuration in the template are automatically applied to the instance without replacing it.
Which two actions should the developer take to meet these requirements?
Select all that apply
A developer is deploying a three-tier web application using an AWS CloudFormation template. The template defines an Amazon RDS DB instance that requires database credentials. The company's security policy requires that database passwords must be stored securely, rotated every 30 days, and retrieved dynamically during stack operations. Additionally, the developer must ensure that any failed stack updates automatically revert to the last stable state without leaving orphaned resources or requiring manual intervention. Which two actions should the developer take to meet these security and deployment requirements? (Select TWO.)
Select all that apply
A development team manages their application infrastructure using an AWS CloudFormation stack. A developer needs to update the stack to change the instance type of an Amazon EC2 instance. However, drift detection reveals that the security group attached to the EC2 instance was manually modified out-of-band in the AWS Management Console to allow traffic on port . In addition, the developer needs to reference a database password that must be automatically rotated.
Which combination of steps should the developer take to resolve the drift and retrieve the password securely and cost-effectively? (Select TWO.)
Select all that apply
A developer is creating an AWS CloudFormation template to deploy a web application. The application requires access to two configuration values:
1. A database connection password that must support automatic rotation every 30 days.
2. A public API endpoint URL for a third-party service that is non-sensitive and updated infrequently.
To follow security best practices and optimize costs, how should the developer store and reference these values in the CloudFormation template?
A developer is deploying updates to an AWS CloudFormation stack. The update fails due to a configuration error, initiating an automatic rollback. However, the rollback fails because a security group managed by the stack was manually attached to an EC2 instance outside of CloudFormation, placing the stack in the UPDATE_ROLLBACK_FAILED state. The developer needs to successfully complete the rollback and return the stack to a stable state. Which action should the developer take to resolve this issue?
An application deployed via an AWS CloudFormation stack requires a database password that must be rotated automatically every 30 days. Additionally, operators occasionally make direct manual changes to the security group rules associated with the stack, which causes drift between the physical resources and the template definition. Which two actions should the developer take to manage these requirements?
Select all that apply
A developer deployed an Amazon EC2 instance and an associated security group using an AWS CloudFormation stack. Later, a network administrator manually added an inbound rule allowing TCP port 3389 (RDP) directly via the Amazon VPC Console to troubleshoot a connection issue. The developer runs drift detection on the stack and confirms that the security group is in a drifted state. The developer wants to restore the security group to the exact configuration defined in the CloudFormation template. Which of the following is the correct method to resolve this drift?
A developer is writing an AWS CloudFormation template to deploy an Amazon EC2 instance that runs a web server. The developer wants to ensure that the EC2 instance is not marked as CREATE_COMPLETE until the web server application package is successfully installed and the service is started. If the installation fails or does not complete within 15 minutes, the stack creation should fail and rollback. Which TWO actions must the developer perform in the CloudFormation template and instance configuration to meet these requirements?
Select all that apply
A company is updating an infrastructure stack deployed via AWS CloudFormation. The template contains an Amazon DynamoDB table that needs to be modified. The planned modification requires CloudFormation to replace the DynamoDB resource. The developer wants to ensure that the database's existing data is preserved and the resource is not deleted during this replacement, as well as if the stack is deleted in the future. Which configuration should the developer apply to the DynamoDB resource in the template?