What should the development team do in the Elastic Beanstalk application version lifecycle settings to retain the source code in the S3 bucket?
Enable versioning on the source bundle S3 bucket.
Disable the S3 bucket lifecycle policy to avoid the archiving of the source bundle.
Update the Elastic Beanstalk application version lifecycle policy to increase the version quota to 50.
Update the Elastic Beanstalk application version lifecycle policy to retain the source bundle in Amazon S3.
Explanations:
Enabling versioning on the S3 bucket allows for the retention of multiple versions of objects, but it does not prevent the deletion of the current version based on the Elastic Beanstalk lifecycle policy. Versioning is more about preserving past versions rather than retaining source bundles that are automatically deleted by lifecycle policies.
Disabling the S3 bucket lifecycle policy would prevent the automatic deletion or archiving of objects in the bucket, but it is not directly related to the Elastic Beanstalk application version lifecycle settings. This option does not specifically address retaining source bundles linked to application versions managed by Elastic Beanstalk.
Increasing the version quota in the Elastic Beanstalk application version lifecycle policy to 50 will allow more application versions to be stored, but it does not address the issue of retaining the source bundle in the S3 bucket after the application version is deleted. This option simply increases storage capacity without ensuring source bundle retention.
Updating the Elastic Beanstalk application version lifecycle policy to retain the source bundle in Amazon S3 directly addresses the requirement of keeping the source code accessible even after the application version lifecycle policy manages the versions. This setting ensures that the source bundle is not deleted when application versions are cleaned up according to the lifecycle policy.