def test_secure_ssm_parameter_update(): lambda_custom_resource.update(event, context) response = ssm.get_parameter('/parameter/store/test/key') assert (response['Parameter']) is not None assert response['Parameter']['Name'] == '/parameter/store/test/key' assert response['Parameter']['Value'] == 'test-value' assert response['Parameter']['Type'] == 'SecureString'
def test_update_get_prefix_list_arns(): arn_list = update(event, context) logger.info(arn_list) for arn in arn_list[1].get('PrefixListArns'): logger.info(arn) assert arn.startswith('arn:aws:ec2')
def test_update_replace_accounts_with_org_id(): lambda_custom_resource.create(event_with_accounts, context) lambda_custom_resource.update(event_replace_accounts_with_org_id, context)
def test_update_remove_account_as_principal_from_both(): lambda_custom_resource.create(event_with_org_arn_and_account, context) lambda_custom_resource.update(event_remove_accounts_from_org_id, context)
def test_update_add_account_as_principal_to_org_id(): lambda_custom_resource.create(event_with_org_arn, context) lambda_custom_resource.update(event_add_accounts_to_org_id, context)
def test_update_same_account_as_principal(): lambda_custom_resource.create(event_with_accounts, context) lambda_custom_resource.update(event_same_accounts, context)
def test_s3ConsoleDeploy_update(): s3_conn = boto3.resource('s3') s3_conn.create_bucket(Bucket='ConsoleBucket') lambda_custom_resource.update(event, context)