added discard feature to s3
fixed discard deploy setting