def create_application_version(key_name, bucket_name, application_name, version_label):
    b = Beanstalk(aws_access_key_id=AWS_ACCESS_KEY, aws_secret_access_key=AWS_SECRET_KEY)

    res = b.create_application_version(
        application_name=application_name, version_label=version_label, s3_bucket=bucket_name, s3_key=key_name
    )

    return res.application_version.version_label
def update_environment(version_label, environment_name):
    b = Beanstalk(aws_access_key_id=AWS_ACCESS_KEY, aws_secret_access_key=AWS_SECRET_KEY)

    res = b.update_environment(environment_name=environment_name, version_label=version_label)

    return res